PATCH 2.4.0.9.7: fix PCI class test in ide-pci.c

From: Jeff Garzik (jgarzik@mandrakesoft.mandrakesoft.com)
Date: Wed Sep 27 2000 - 03:59:40 EST


My laptop reports that its IDE interface is PCI_CLASS_STORAGE_IDE,
but the code which tests for this looks all screwed up.

I changed the test as shown by the below patch, which looks like an
obviously correct fix to me.

When tested on my laptop, I now get
        VP_IDE: bad irq(0): will probe later

Looking at lspci, my IDE interface doesn't report its IRQ directly via
the PCI interface, so this message looks correct (if a bit ominous).

        Jeff

Index: drivers/ide/ide-pci.c
===================================================================
RCS file: /usr/jgarzik/cvslan/linux_2_3/drivers/ide/ide-pci.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 ide-pci.c
--- drivers/ide/ide-pci.c 2000/07/28 05:04:35 1.1.1.8
+++ drivers/ide/ide-pci.c 2000/09/27 08:37:47
@@ -538,7 +538,7 @@
          * Can we trust the reported IRQ?
          */
         pciirq = dev->irq;
- if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
+ if ((dev->class & ~(0xff)) != (PCI_CLASS_STORAGE_IDE << 8)) {
                 printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
                 /*
                  * This allows offboard ide-pci cards the enable a BIOS,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:19 EST