From ink@jurassic.park.msu.ru Mon Oct 31 15:30:25 2005 Date: Tue, 1 Nov 2005 01:43:56 +0300 From: Ivan Kokshaysky To: Greg KH Cc: Subject: [patch] PCI: NCR 53c810 quirk Message-ID: <20051101014356.A1779@jurassic.park.msu.ru> Content-Disposition: inline Move the PPC fixup for old NCR 810 controllers to generic quirks - it's needed for Alpha, x86 and other architectures that use setup-bus.c. Thanks to Jay Estabrook for pointing out the issue. Signed-off-by: Ivan Kokshaysky Signed-off-by: Greg Kroah-Hartman arch/ppc/kernel/pci.c | 14 -------------- drivers/pci/quirks.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) --- gregkh-2.6.orig/arch/ppc/kernel/pci.c 2005-11-02 09:24:55.000000000 -0800 +++ gregkh-2.6/arch/ppc/kernel/pci.c 2005-11-02 11:54:11.000000000 -0800 @@ -62,20 +62,6 @@ static int pci_bus_count; static void -fixup_rev1_53c810(struct pci_dev* dev) -{ - /* rev 1 ncr53c810 chips don't set the class at all which means - * they don't get their resources remapped. Fix that here. - */ - - if ((dev->class == PCI_CLASS_NOT_DEFINED)) { - printk("NCR 53c810 rev 1 detected, setting PCI class.\n"); - dev->class = PCI_CLASS_STORAGE_SCSI; - } -} -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); - -static void fixup_broken_pcnet32(struct pci_dev* dev) { if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { --- gregkh-2.6.orig/drivers/pci/quirks.c 2005-11-02 11:54:04.000000000 -0800 +++ gregkh-2.6/drivers/pci/quirks.c 2005-11-02 11:54:11.000000000 -0800 @@ -1243,6 +1243,21 @@ } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos); + +static void __devinit fixup_rev1_53c810(struct pci_dev* dev) +{ + /* rev 1 ncr53c810 chips don't set the class at all which means + * they don't get their resources remapped. Fix that here. + */ + + if (dev->class == PCI_CLASS_NOT_DEFINED) { + printk(KERN_INFO "NCR 53c810 rev 1 detected, setting PCI class.\n"); + dev->class = PCI_CLASS_STORAGE_SCSI; + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); + + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) { while (f < end) {