diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-06-30 06:13:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-06-30 06:13:53 -0700 |
| commit | fed6101405813d65db90d140c60cd442d0e44884 (patch) | |
| tree | 66e8148aa4367218f749c4e8e3940f6cdc477a83 | |
| parent | 61a258091c972dbeba99fccb8e34c07acbc387ff (diff) | |
Fix the code that checks for PCI IDE controller "native" vs "legacy"
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.
| -rw-r--r-- | drivers/ide/setup-pci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index c73978739896..45a989dd55ad 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -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); |
