Skip to contentSkip to conversation

usb: dwc3: haps: Workaround matching VID PID

DISCUSSION Felipe Balbi 1 participant 1 message Feb 7, 2019 USB

lore
Share & tools
lore
#0 lore raw

Hi,

Quoted 17 lines · Thinh Nguyen

i.MX6QP and i.MX7D platform use a PCIe controller with the same VID and PID as this USB controller. The system may incorrectly match this driver to that PCIe controller. To workaround this, specifically use class type USB with PCI device ID to prevent incorrect driver matching.

---
 drivers/usb/dwc3/dwc3-haps.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/usb/dwc3/dwc3-haps.c +0 -0
index 02d57d98ef9b..3cecbf169452 100644
@@ -106,6 +106,15 @@ static const struct pci_device_id dwc3_haps_id_table[] = {
 	{
 		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,

drivers/usb/dwc3/dwc3-haps.c static const struct pci_device_id dwc3_haps_id_table[] = { · line 117

Quoted 10 lines
drivers/usb/dwc3/dwc3-haps.c +9 -0
 			   PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3),
+		/*
+		 * i.MX6QP and i.MX7D platform use a PCIe controller with the
+		 * same VID and PID as this USB controller. The system may
+		 * incorrectly match this driver to that PCIe controller. To
+		 * workaround this, specifically use class type USB to prevent
+		 * incorrect driver matching.
+		 */
+		.class = (PCI_CLASS_SERIAL_USB << 8),
+		.class_mask = 0xffff00,

Just curious, how can NXP use Synopsys' vendor ID?