]> git.hungrycats.org Git - linux/commitdiff
Re-instate the ALI northbridge checks in ALI IDE driver
authorLinus Torvalds <torvalds@home.osdl.org>
Tue, 11 Nov 2003 23:53:58 +0000 (15:53 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 11 Nov 2003 23:53:58 +0000 (15:53 -0800)
This leaves just the minimal oops protection in place, and
maintains the logic that "if we have a non-ALI northbridge,
we shouldn't touch any of the GPIOs because we don't know
what they might be connected to".

drivers/ide/pci/alim15x3.c

index 31d6e9ae7c7287cb5f0e69a7fe620c9050f4cf3d..52225ce5e97ab6e6d6657cf89c6af2aa0426195d 100644 (file)
@@ -578,6 +578,7 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
 {
        unsigned long flags;
        u8 tmpbyte;
+       struct pci_dev *north = pci_find_slot(0, PCI_DEVFN(0,0));
 
        pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision);
 
@@ -624,9 +625,11 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
 
        /*
         * We should only tune the 1533 enable if we are using an ALi
-        * south bridge.
+        * North bridge. We might have no north found on some zany
+        * box without a device at 0:0.0. The ALi bridge will be at
+        * 0:0.0 so if we didn't find one we know what is cooking.
         */
-       if (!isa_dev) {
+       if (!isa_dev || (north && north->vendor != PCI_VENDOR_ID_AL)) {
                local_irq_restore(flags);
                return 0;
        }