[PATCH] PCI: Add quirk for setting valid class for FSL PCI host bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Freescale platform has class code = 0x0b2000, when it boots. This makes
kernel PCI bus code to setup these devices resulting into the following
notice information when trying to enable them:

pci 0000:00:00.0: ignoring class 0x0b2000 (doesn't match header type 01)

This patch adds a ID specific(PCI_VENDOR_ID_FREESCALE & PCI_ANY_ID based)
'early' fixup quirk to replace class code with PCI_CLASS_BRIDGE_PCI as
class. Then the above information disappears.

Signed-off-by: Chunhe Lan <Chunhe.Lan@xxxxxxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
---
 drivers/pci/quirks.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e85d230..906a04a3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2772,6 +2772,16 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, vtd_mask_spec_errors);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
 #endif
 
+#ifdef CONFIG_FSL_PCI
+static void quirk_freescale_class(struct pci_dev *dev)
+{
+	dev_info(&dev->dev, "Setting PCI class for FSL PCI host bridge\n");
+	dev->class = (PCI_CLASS_BRIDGE_PCI << 8) | (dev->class & 0xff);
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID,
+			quirk_freescale_class);
+#endif
+
 static void fixup_ti816x_class(struct pci_dev *dev)
 {
 	/* TI 816x devices do not have class code set when in PCIe boot mode */
-- 
1.7.6.5


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux