]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ALI IDE forward port from 2.4.x
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Wed, 12 Nov 2003 01:02:24 +0000 (17:02 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 12 Nov 2003 01:02:24 +0000 (17:02 -0800)
This forward-ports some more of the ALI IDE sanity checks from the 2.4.x
tree.

In particular, we only do the enable bits for revisions < 0xC5

drivers/ide/pci/alim15x3.c

index 52225ce5e97ab6e6d6657cf89c6af2aa0426195d..74202147fa05540d62a47affcc4e02619b0507ed 100644 (file)
@@ -629,28 +629,30 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
         * 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 || (north && north->vendor != PCI_VENDOR_ID_AL)) {
+       if (north && north->vendor != PCI_VENDOR_ID_AL) {
                local_irq_restore(flags);
                return 0;
        }
 
-       /*
-        * set south-bridge's enable bit, m1533, 0x79
-        */
-
-       pci_read_config_byte(isa_dev, 0x79, &tmpbyte);
-       if (m5229_revision == 0xC2) {
+       if (m5229_revision < 0xC5 && isa_dev)
+       {       
                /*
-                * 1543C-B0 (m1533, 0x79, bit 2)
+                * set south-bridge's enable bit, m1533, 0x79
                 */
-               pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04);
-       } else if (m5229_revision >= 0xC3) {
-               /*
-                * 1553/1535 (m1533, 0x79, bit 1)
-                */
-               pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
-       }
 
+               pci_read_config_byte(isa_dev, 0x79, &tmpbyte);
+               if (m5229_revision == 0xC2) {
+                       /*
+                        * 1543C-B0 (m1533, 0x79, bit 2)
+                        */
+                       pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04);
+               } else if (m5229_revision >= 0xC3) {
+                       /*
+                        * 1553/1535 (m1533, 0x79, bit 1)
+                        */
+                       pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
+               }
+       }
        local_irq_restore(flags);
        return 0;
 }