linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: missing parentheses in USE_NEW_SCHEME
@ 2020-01-04 11:02 atmgnd
  2020-01-04 11:46 ` gregkh
  0 siblings, 1 reply; 7+ messages in thread
From: atmgnd @ 2020-01-04 11:02 UTC (permalink / raw)
  To: gregkh; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

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



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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-04 11:02 [PATCH] usb: missing parentheses in USE_NEW_SCHEME atmgnd
@ 2020-01-04 11:46 ` gregkh
  2020-01-05  1:15   ` atmgnd
  0 siblings, 1 reply; 7+ messages in thread
From: gregkh @ 2020-01-04 11:46 UTC (permalink / raw)
  To: atmgnd; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

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 :(


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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-04 11:46 ` gregkh
@ 2020-01-05  1:15   ` atmgnd
  2020-01-05  1:17     ` atmgnd
  2020-01-05  8:17     ` gregkh
  0 siblings, 2 replies; 7+ messages in thread
From: atmgnd @ 2020-01-05  1:15 UTC (permalink / raw)
  To: gregkh; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

Is that ok ? Ordinarily I dont use protonmail, only because outlook mail is blocked by kernel email system.
So I register this email to send plain/text emails.
I will resend it.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, January 4, 2020 7:46 PM, gregkh@linuxfoundation.org <gregkh@linuxfoundation.org> wrote:

> 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 :(



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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-05  1:15   ` atmgnd
@ 2020-01-05  1:17     ` atmgnd
  2020-01-05  8:17     ` gregkh
  1 sibling, 0 replies; 7+ messages in thread
From: atmgnd @ 2020-01-05  1:17 UTC (permalink / raw)
  To: gregkh; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

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@protonmail.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



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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-05  1:15   ` atmgnd
  2020-01-05  1:17     ` atmgnd
@ 2020-01-05  8:17     ` gregkh
  2020-01-05 11:35       ` atmgnd
  1 sibling, 1 reply; 7+ messages in thread
From: gregkh @ 2020-01-05  8:17 UTC (permalink / raw)
  To: atmgnd; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

On Sun, Jan 05, 2020 at 01:15:41AM +0000, atmgnd wrote:
> Is that ok ? Ordinarily I dont use protonmail, only because outlook mail is blocked by kernel email system.
> So I register this email to send plain/text emails.
> I will resend it.

Just add a "From:" line in the first line of the changelog text to match
up with your "real" email address.  The kernel and git documentation
should show this.

thanks,

greg k-h

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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-05  8:17     ` gregkh
@ 2020-01-05 11:35       ` atmgnd
  2020-01-08 16:43         ` gregkh
  0 siblings, 1 reply; 7+ messages in thread
From: atmgnd @ 2020-01-05 11:35 UTC (permalink / raw)
  To: gregkh; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

I have already resend you a new patch with 'Signed-off-by: Qi Zhou <atmgnd@protonmail.com>', Can you just use that one ? thanks.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, January 5, 2020 4:17 PM, gregkh@linuxfoundation.org <gregkh@linuxfoundation.org> wrote:

> On Sun, Jan 05, 2020 at 01:15:41AM +0000, atmgnd wrote:
>
> > Is that ok ? Ordinarily I dont use protonmail, only because outlook mail is blocked by kernel email system.
> > So I register this email to send plain/text emails.
> > I will resend it.
>
> Just add a "From:" line in the first line of the changelog text to match
> up with your "real" email address. The kernel and git documentation
> should show this.
>
> thanks,
>
> greg k-h



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

* Re: [PATCH] usb: missing parentheses in USE_NEW_SCHEME
  2020-01-05 11:35       ` atmgnd
@ 2020-01-08 16:43         ` gregkh
  0 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2020-01-08 16:43 UTC (permalink / raw)
  To: atmgnd; +Cc: Alan Stern, Randy Dunlap, linux-kernel, USB list

On Sun, Jan 05, 2020 at 11:35:30AM +0000, atmgnd wrote:
> I have already resend you a new patch with 'Signed-off-by: Qi Zhou <atmgnd@protonmail.com>', Can you just use that one ? thanks.

Ugh, I have to edit it by hand, but will do so.

Please work on fixing up your email system, 'git send-email' should work
with just about any MTA out there.

greg k-h

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

end of thread, other threads:[~2020-01-08 16:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-04 11:02 [PATCH] usb: missing parentheses in USE_NEW_SCHEME atmgnd
2020-01-04 11:46 ` gregkh
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

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).