Skip to contentSkip to conversation

PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18 [not wrapped]

PATCH New Graham Cobb 1 participant 1 message Apr 8, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI fixup for old NCR 53C810 SCSI chips, kernel 2.4.18 [not wrapped]

Repost of my patch for DECpc XL systems and other old motherboards using the NCR 53C810. This one should not be wrapped by my mailer. Apologies for the earlier mail screwup.

Graham

arch/i386/kernel/pci-pc.c +13 -0
@@ -1058,6 +1058,18 @@
 		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;
@@ -1148,6 +1160,7 @@
 	{ 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 }
 };