]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Fix generic NCR 53c810 class code quirk
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 19 Jun 2015 20:36:45 +0000 (15:36 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 14 Jul 2015 18:39:44 +0000 (13:39 -0500)
commitd459a3e7eaed380415c25ed52e8c51222d684765
treef43510dfb70c54183cfd730a8e8bde85da244fa2
parent6582386ca866cac029f4469e967b39bcf0f4ead9
PCI: Fix generic NCR 53c810 class code quirk

In the generic quirk fixup_rev1_53c810(), added by 5443a59ceda2 ("[PATCH]
PCI: NCR 53c810 quirk"), we assigned "class = PCI_CLASS_STORAGE_SCSI".  But
PCI_CLASS_STORAGE_SCSI is only the two-byte base class/sub-class and needs
to be shifted to make space for the low-order interface byte.

Furthermore, we had a similar quirk, pci_fixup_ncr53c810(), for arch/x86,
which assigned class correctly.  The arch code is linked before the PCI
core, so arch quirks run before generic quirks.  Therefore, on x86, the x86
arch quirk ran first, and the generic quirk did nothing because it saw that
dev->class was already set.  But on other arches, the generic quirk set the
wrong class code.

Fix the generic quirk to set the correct class code and remove the
now-unnecessary x86-specific quirk.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Matthew Wilcox <matthew@wil.cx>
arch/x86/pci/fixup.c
drivers/pci/quirks.c