]> git.hungrycats.org Git - linux/commitdiff
[PATCH] NCR53c810 PCI quirk
authorDave Jones <davej@suse.de>
Sun, 28 Apr 2002 11:56:26 +0000 (04:56 -0700)
committerJaroslav Kysela <perex@suse.cz>
Sun, 28 Apr 2002 11:56:26 +0000 (04:56 -0700)
This device returns a wrong class code which we work around at boot up time.

arch/i386/kernel/pci-pc.c

index 218cccff1a7b38a68906a226c98f6c674257b81b..a530c2d1707ba596135fe5d594b8d06a4435b42d 100644 (file)
@@ -1132,11 +1132,23 @@ static void __devinit  pci_fixup_umc_ide(struct pci_dev *d)
         */
        int i;
 
-       printk("PCI: Fixing base address flags for device %s\n", d->slot_name);
+       printk(KERN_WARNING "PCI: Fixing base address flags for device %s\n", d->slot_name);
        for(i=0; i<4; i++)
                d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
 }
 
+static void __devinit  pci_fixup_ncr53c810(struct pci_dev *d)
+{
+    /*
+     * NCR 53C810 returns class code 0 (at least on some systems).
+     * Fix class to be PCI_CLASS_STORAGE_SCSI
+     */
+    if (!d->class) {
+        printk("PCI: fixing NCR 53C810 class code for %s\n", d->slot_name);
+        d->class = PCI_CLASS_STORAGE_SCSI << 8;
+    }
+}
+
 static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
 {
        int i;
@@ -1228,6 +1240,7 @@ struct pci_fixup pcibios_fixups[] = {
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_8622,         pci_fixup_via_northbridge_bug },
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_8361,         pci_fixup_via_northbridge_bug },
        { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_VIA,      PCI_DEVICE_ID_VIA_8367_0,       pci_fixup_via_northbridge_bug },
+       { PCI_FIXUP_HEADER,     PCI_VENDOR_ID_NCR,      PCI_DEVICE_ID_NCR_53C810,       pci_fixup_ncr53c810 },
        { 0 }
 };