diff mbox

[v2,2/5] PCI: Add quirk for PLDA's XpressRICH3 host bridge class.

Message ID 1444409849-5685-3-git-send-email-Liviu.Dudau@arm.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Liviu Dudau Oct. 9, 2015, 4:57 p.m. UTC
The XpressRICH3 host bridge at power up has an unassigned class on
some of ARM Ltd boards, add a quirk to correct that.

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
 drivers/pci/quirks.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Arnd Bergmann Oct. 9, 2015, 6:32 p.m. UTC | #1
On Friday 09 October 2015 17:57:26 Liviu Dudau wrote:
> +/*
> + * The PLDA's XpressRICH3 doesn't describe itself as a bridge. This is required
> + * for correct/normal enumeration.
> + */
> +static void xr3pci_quirk_class(struct pci_dev *pdev)
> +{
> +       pdev->class = PCI_CLASS_BRIDGE_PCI << 8;
> +}
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLDA, PCI_DEVICE_ID_XR3PCI, xr3pci_quirk_class);
> 

Are you sure that this device ID is only used for the host bridge, not
for related devices in endpoint mode?

While we don't support PCIe endpoint drivers at the moment, it might
happen at some point and then things break when someone tries to
plug a machine with this ID into a Linux host.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Liviu Dudau Oct. 12, 2015, 8:57 a.m. UTC | #2
On Fri, Oct 09, 2015 at 08:32:07PM +0200, Arnd Bergmann wrote:
> On Friday 09 October 2015 17:57:26 Liviu Dudau wrote:
> > +/*
> > + * The PLDA's XpressRICH3 doesn't describe itself as a bridge. This is required
> > + * for correct/normal enumeration.
> > + */
> > +static void xr3pci_quirk_class(struct pci_dev *pdev)
> > +{
> > +       pdev->class = PCI_CLASS_BRIDGE_PCI << 8;
> > +}
> > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLDA, PCI_DEVICE_ID_XR3PCI, xr3pci_quirk_class);
> > 
> 
> Are you sure that this device ID is only used for the host bridge, not
> for related devices in endpoint mode?

I would hope so. The device ID has been assigned to ARM's implementation by PLDA,
it would be logical not to be reused for anyone else's.

> 
> While we don't support PCIe endpoint drivers at the moment, it might
> happen at some point and then things break when someone tries to
> plug a machine with this ID into a Linux host.

I'm asking for confirmation inside ARM that the IDs are uniquely allocated to Juno
and will come back when I'll get confirmation.

Best regards,
Liviu

> 
> 	Arnd
>
diff mbox

Patch

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b03373f..ae24bb4 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4149,3 +4149,13 @@  static void quirk_intel_qat_vf_cap(struct pci_dev *pdev)
 	}
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap);
+
+/*
+ * The PLDA's XpressRICH3 doesn't describe itself as a bridge. This is required
+ * for correct/normal enumeration.
+ */
+static void xr3pci_quirk_class(struct pci_dev *pdev)
+{
+	pdev->class = PCI_CLASS_BRIDGE_PCI << 8;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLDA, PCI_DEVICE_ID_XR3PCI, xr3pci_quirk_class);