[PATCH] Re: Catching NForce2 lockup with NMI watchdog - found

From: Bartlomiej Zolnierkiewicz
Date: Sat Dec 06 2003 - 08:11:15 EST



It is possible :-). Here is a completly untested patch.

[PATCH] fix lockups with APIC support on nForce2

Add PCI quirk to disable Halt Disconnect and Stop Grant Disconnect
(based on athcool program by Osamu Kayasono).

arch/i386/pci/fixup.c | 13 +++++++++++++
1 files changed, 13 insertions(+)

diff -puN arch/i386/pci/fixup.c~nforce2_disconnect_quirk arch/i386/pci/fixup.c
--- linux-2.6.0-test11/arch/i386/pci/fixup.c~nforce2_disconnect_quirk 2003-12-06 13:36:56.147911576 +0100
+++ linux-2.6.0-test11-root/arch/i386/pci/fixup.c 2003-12-06 14:03:41.655837272 +0100
@@ -187,6 +187,18 @@ static void __devinit pci_fixup_transpar
dev->transparent = 1;
}

+/*
+ * Halt Disconnect and Stop Grant Disconnect (bit 4 at offset 0x6F)
+ * must be disabled when APIC is used (or lockups will happen).
+ */
+static void __devinit pci_fixup_nforce2_disconnect(struct pci_dev *d)
+{
+ u8 t;
+
+ pci_read_config_byte(d, 0x6F, &t);
+ pci_write_config_byte(d, 0x6F, (t & 0xef));
+}
+
struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx },
@@ -205,5 +217,6 @@ struct pci_fixup pcibios_fixups[] = {
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810 },
{ PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_fixup_transparent_bridge },
+ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2_disconnect },
{ 0 }
};

_

On Saturday 06 of December 2003 13:24, Prakash K. Cheemplavam wrote:
> cheuche+lkml@xxxxxxx wrote:
> > On Sat, Dec 06, 2003 at 12:49:50AM +0100, Prakash K. Cheemplavam wrote:
> >>So gals and guys, try disabling cpu disconnect in bios and see whether
> >>aopic now runs stable.
> >
> > Yes that fix it. Well time will tell but I cannot make it crash with
> > hdparm -tT or cat /dev/hda so far. I'm dumping hda to /dev/null right
> > now.
> >
> > After testing to make it crash, I used athcool to reenable CPU
> > disconnect, and guess what, test after that just crashed the box.
> > You found the problem, congratulations.
> >
> :-)
>
> Isn't it possible to ad athcool's code into the kernel, maybe into the
> pm section or even make it an kernel option. It seems to be a nice
> workaround for the time-being.
>
> Prakash

-
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/