linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb: dwc3: haps: Workaround matching VID PID
@ 2019-02-06 18:49 Thinh Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thinh Nguyen @ 2019-02-06 18:49 UTC (permalink / raw)
  To: Felipe Balbi, linux-usb; +Cc: John Youn, Thinh Nguyen, Bjorn Helgaas

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.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
 drivers/usb/dwc3/dwc3-haps.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/usb/dwc3/dwc3-haps.c b/drivers/usb/dwc3/dwc3-haps.c
index 02d57d98ef9b..3cecbf169452 100644
--- a/drivers/usb/dwc3/dwc3-haps.c
+++ b/drivers/usb/dwc3/dwc3-haps.c
@@ -106,6 +106,15 @@ static const struct pci_device_id dwc3_haps_id_table[] = {
 	{
 		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
 			   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,
 	},
 	{
 		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* usb: dwc3: haps: Workaround matching VID PID
@ 2019-02-07 11:16 Felipe Balbi
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2019-02-07 11:16 UTC (permalink / raw)
  To: Thinh Nguyen, linux-usb; +Cc: John Youn, Bjorn Helgaas

Hi,

Thinh Nguyen <thinh.nguyen@synopsys.com> writes:
> 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.
>
> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
> ---
>  drivers/usb/dwc3/dwc3-haps.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/usb/dwc3/dwc3-haps.c b/drivers/usb/dwc3/dwc3-haps.c
> index 02d57d98ef9b..3cecbf169452 100644
> --- a/drivers/usb/dwc3/dwc3-haps.c
> +++ b/drivers/usb/dwc3/dwc3-haps.c
> @@ -106,6 +106,15 @@ static const struct pci_device_id dwc3_haps_id_table[] = {
>  	{
>  		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
>  			   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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* usb: dwc3: haps: Workaround matching VID PID
@ 2019-02-07 20:59 Thinh Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thinh Nguyen @ 2019-02-07 20:59 UTC (permalink / raw)
  To: Felipe Balbi, Thinh Nguyen, linux-usb@vger.kernel.org
  Cc: John Youn, Bjorn Helgaas, Lucas Stach, Lukas F. Hartmann,
	Trent Piepho

Hi Felipe,

Felipe Balbi wrote:
> Hi,
>
> Thinh Nguyen <thinh.nguyen@synopsys.com> writes:
>> 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.
>>
>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
>> ---
>>  drivers/usb/dwc3/dwc3-haps.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/usb/dwc3/dwc3-haps.c b/drivers/usb/dwc3/dwc3-haps.c
>> index 02d57d98ef9b..3cecbf169452 100644
>> --- a/drivers/usb/dwc3/dwc3-haps.c
>> +++ b/drivers/usb/dwc3/dwc3-haps.c
>> @@ -106,6 +106,15 @@ static const struct pci_device_id dwc3_haps_id_table[] = {
>>  	{
>>  		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
>>  			   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?
>

NXP cannot use Synopsys' vendor ID. This workaround is intended for the
PCIe controller on their existing SoC.

Thanks,
Thinh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-07 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-07 11:16 usb: dwc3: haps: Workaround matching VID PID Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2019-02-07 20:59 Thinh Nguyen
2019-02-06 18:49 Thinh Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).