Commit fed61014 authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 61a25809
......@@ -703,7 +703,8 @@ static ata_index_t do_ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_
*/
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment