From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: atmgnd <atmgnd@protonmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Randy Dunlap <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
Date: Sat, 4 Jan 2020 12:46:03 +0100 [thread overview]
Message-ID: <20200104114603.GB1288021@kroah.com> (raw)
In-Reply-To: <ht4mtag8ZP-HKEhD0KkJhcFnVlOFV8N8eNjJVRD9pDkkLUNhmEo8_cL_sl7xy9mdajdH-T8J3TFQsjvoYQT61NFjQXy469Ed_BbBw_x4S1E=@protonmail.com>
On Sat, Jan 04, 2020 at 11:02:01AM +0000, atmgnd wrote:
> accroding to bd0e6c9#diff-28615d62e1250eadc353d804f49bc6d6, will try old enumeration
> scheme first for high speed devices. for example, when a high speed device pluged in,
> line 2720 should expand to 0 at the first time. USE_NEW_SCHEME(0, 0 || 0 || 1) === 0.
> but it wrongly expand to 1(alway expand to 1 for high speed device), and change
> USE_NEW_SCHEME to USE_NEW_SCHEME((i) % 2 == (int)(scheme)) may be better ?
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Qi Zhou <atmgnd@outlook.com>
> ---
> drivers/usb/core/hub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index f229ad6952c0..7d17deca7021 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -2692,7 +2692,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
> #define SET_ADDRESS_TRIES 2
> #define GET_DESCRIPTOR_TRIES 2
> #define SET_CONFIG_TRIES (2 * (use_both_schemes + 1))
> -#define USE_NEW_SCHEME(i, scheme) ((i) / 2 == (int)scheme)
> +#define USE_NEW_SCHEME(i, scheme) ((i) / 2 == (int)(scheme))
>
> #define HUB_ROOT_RESET_TIME 60 /* times are in msec */
> #define HUB_SHORT_RESET_TIME 10
> --
> 2.17.1
>
>
Much better, but your From: name does not match your signed-off-by name :(
next prev parent reply other threads:[~2020-01-04 11:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-04 11:02 atmgnd
2020-01-04 11:46 ` gregkh [this message]
2020-01-05 1:15 ` atmgnd
2020-01-05 1:17 ` atmgnd
2020-01-05 8:17 ` gregkh
2020-01-05 11:35 ` atmgnd
2020-01-08 16:43 ` gregkh
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=20200104114603.GB1288021@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=atmgnd@protonmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rdunlap@infradead.org \
--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
all inboxes | Powered by JetHome®