public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ran Wang <ran.wang_1@nxp.com>
Cc: 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>,
	"open list:USB SUBSYSTEM" <linux-usb@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: hub add filter for device with specific VID&PID
Date: Mon, 23 Sep 2019 13:07:12 +0200	[thread overview]
Message-ID: <20190923110712.GA2796979@kroah.com> (raw)
In-Reply-To: <20190923105102.37413-1-ran.wang_1@nxp.com>

On Mon, Sep 23, 2019 at 06:51:02PM +0800, Ran Wang wrote:
> 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.

Why is this a requirement?

And why those specific vid/pid values?  What do they refer to?

> 
> 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
> +		 */

Nit, can you align your comment lines, to match the other multi-line
comments in this file?  Otherwise it starts to look bad over time.



> +		if ((udev->descriptor.idVendor == 0x1a0a)
> +		 && (udev->descriptor.idProduct == 0x0201)) {

Are you sure you don't have to convert this value into cpu endian before
checking it?

thanks,

greg k-h

  reply	other threads:[~2019-09-23 11:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=20190923110712.GA2796979@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dennis.wassenberg@secunet.com \
    --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=ran.wang_1@nxp.com \
    --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