From: Ran Wang <ran.wang_1@nxp.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Alan Stern <stern@rowland.harvard.edu>,
Mathias Payer <mathias.payer@nebelwelt.net>,
Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: linux-usb@vger.kernel.org (open list:USB SUBSYSTEM),
linux-kernel@vger.kernel.org (open list),
Ran Wang <ran.wang_1@nxp.com>
Subject: [PATCH] usb: hub add filter for device with specific VID&PID
Date: Mon, 23 Sep 2019 18:51:02 +0800 [thread overview]
Message-ID: <20190923105102.37413-1-ran.wang_1@nxp.com> (raw)
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
next reply other threads:[~2019-09-23 10:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 10:51 Ran Wang [this message]
2019-09-23 11:07 ` [PATCH] usb: hub add filter for device with specific VID&PID 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190923105102.37413-1-ran.wang_1@nxp.com \
--to=ran.wang_1@nxp.com \
--cc=dennis.wassenberg@secunet.com \
--cc=gregkh@linuxfoundation.org \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=mathias.payer@nebelwelt.net \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox