public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: hub add filter for device with specific VID&PID
@ 2019-09-23 10:51 Ran Wang
  2019-09-23 11:07 ` Greg Kroah-Hartman
  2019-09-23 15:01 ` Alan Stern
  0 siblings, 2 replies; 10+ messages in thread
From: Ran Wang @ 2019-09-23 10:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Kai-Heng Feng, Mathias Nyman, Alan Stern,
	Mathias Payer, Dennis Wassenberg
  Cc: open list:USB SUBSYSTEM, open list, Ran Wang

USB 2.0 Embedded Host PET Automated Test (CH6) 6.7.23 A-UUT "Unsupported
Device" Message require to stop enumerating device with VID=0x1a0a PID=0x0201
and pop message to declare this device is not supported.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
---
 drivers/usb/core/hub.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index bbcfa63..3cda0da 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4982,6 +4982,18 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
 		if (status < 0)
 			goto loop;
 
+		 /* USB 2.0 Embedded Host PET Automated Test (CH6)
+		 * 6.7.23 A-UUT "Unsupported Device" Message
+		 * require to filter out below device when enumeration
+		 */
+		if ((udev->descriptor.idVendor == 0x1a0a)
+		 && (udev->descriptor.idProduct == 0x0201)) {
+			dev_err(&udev->dev, "This device is not supported: idVendor=0x%x idProduct=0x%x\n",
+				udev->descriptor.idVendor,
+				udev->descriptor.idProduct);
+			goto done;
+		}
+
 		if (udev->quirks & USB_QUIRK_DELAY_INIT)
 			msleep(2000);
 
-- 
2.7.4


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

end of thread, other threads:[~2019-09-29  6:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-23 10:51 [PATCH] usb: hub add filter for device with specific VID&PID Ran Wang
2019-09-23 11:07 ` Greg Kroah-Hartman
2019-09-24  3:23   ` Ran Wang
2019-09-27 17:08     ` Alan Stern
2019-09-29  2:35       ` Ran Wang
2019-09-29  2:57         ` Ran Wang
2019-09-29  6:29           ` Peter Chen
2019-09-29  6:36       ` Peter Chen
2019-09-23 15:01 ` Alan Stern
2019-09-24  3:32   ` Ran Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox