Submitter | Thinh Nguyen |
---|---|
Date | Feb. 4, 2019, 11:18 p.m. |
Message ID | <30102591E157244384E984126FC3CB4F639C0B41@us01wembx1.internal.synopsys.com> |
Download | mbox | patch |
Permalink | /patch/717937/ |
State | New |
Headers | show |
Comments
On Mon, 2019-02-04 at 23:18 +0000, Thinh Nguyen wrote: > Trent Piepho wrote: > > On Mon, 2018-12-10 at 14:08 -0800, Thinh Nguyen wrote: > > > Synopsys USB 3.x host HAPS platform has a class code of > > > PCI_CLASS_SERIAL_USB_XHCI, and xhci driver can claim it. However, these > > > devices should use dwc3-haps driver. Change these devices' class code to > > > PCI_CLASS_SERIAL_USB_DEVICE to prevent the xhci-pci driver from claiming > > > them. > > > > > This change breaks my IMX7d based device. This SoC has a PCIe bus > > based on the Synopsys Designware host controller. This has a root > > > > > Right. Lukas also reported this. It appears that there's a duplicate VID > PID used for the USB controller on HAPS platform. You can review the > discussion subject "Linux Kernel Regression: HAPS quirk breaks PCIe on > i.MX6QP". > > -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_ANY_ID, > - quirk_synopsys_haps); > +DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_ANY_ID, > + PCI_CLASS_SERIAL_USB_XHCI, 0, quirk_synopsys_haps); Thanks for the quick response. Tested this on imx7d, and as expected, it fixes the problem. The host bridge has class PCI_CLASS_BRIDGE_PCI like it should and the quirk no longer matches.
Patch
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index b0a413f3f7ca..f46e7de9e15d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -639,8 +639,8 @@ static void quirk_synopsys_haps(struct pci_dev *pdev) break; } } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_ANY_ID, - quirk_synopsys_haps); +DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_SYNOPSYS, PCI_ANY_ID, + PCI_CLASS_SERIAL_USB_XHCI, 0, quirk_synopsys_haps); /* * Let's make the southbridge information explicit instead of having to