]> git.hungrycats.org Git - linux/commitdiff
Fix the code that checks for PCI IDE controller "native" vs "legacy"
authorLinus Torvalds <torvalds@home.osdl.org>
Mon, 30 Jun 2003 13:13:53 +0000 (06:13 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 30 Jun 2003 13:13:53 +0000 (06:13 -0700)
modes.

It used to think that IDE controllers that weren't marked as "IDE storage"
PCI class (eg CMD IDE RAID controllers mark themselves as "RAID storage")
were always using legacy mode interrupt routing, which is bogus. In fact,
the whole native vs legacy thing only makes sense for the IDE storage class,
so fix the test to match.

drivers/ide/setup-pci.c

index c7397873989680b9a945549fbcadce0a515a5eba..45a989dd55ad2bb4eab7963b19fa0c5e301eda06 100644 (file)
@@ -702,8 +702,9 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
         * Can we trust the reported IRQ?
         */
        pciirq = dev->irq;
-       
-       if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
+
+       /* Is it an "IDE storage" device in non-PCI mode? */
+       if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 5) != 5) {
                if (noisy)
                        printk(KERN_INFO "%s: not 100%% native mode: "
                                "will probe irqs later\n", d->name);