[PATCH] firewire: fix some broken hardware NMI interrupt

From:
Date: Wed May 21 2008 - 09:07:59 EST


>From JiSheng Zhang <jszhang3@xxxxxxxxxxxxxxxx>

Some broken pci-1394 card does not clear completely on-chip memory during boot, it
may cause pci parity error, then NMI interrupt. It will emit kernel message such
as"Uhhuh. NMI received for unknown reason b1 on CPU 0. You have some hardware
problem, likely on the PCI bus. Dazed and confused, but trying to continue" etc.
If panic_on_unrecovered_nmi is set to 1, the system will panic. This patch will
fix it


--- linux-2.6.25.4/drivers/firewire/fw-ohci.c.org 2008-05-21 20:44:26.901066202
+0800
+++ linux-2.6.25.4/drivers/firewire/fw-ohci.c 2008-05-21 20:55:15.290371532 +0800
@@ -2051,6 +2051,7 @@
struct fw_ohci *ohci;
u32 bus_options, max_receive, link_speed;
u64 guid;
+ u16 reg;
int err;
size_t size;

@@ -2082,6 +2083,10 @@

pci_set_master(dev);
pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0);
+ /* some broken hardware */
+ pci_read_config_word(dev, PCI_COMMAND, &reg);
+ reg &= ~(PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
+ pci_write_config_word(dev, PCI_COMMAND, reg);
pci_set_drvdata(dev, ohci);

#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/