linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
@ 2014-03-26  9:28 Roger Quadros
  2014-03-26 10:50 ` Sebastian Andrzej Siewior
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Roger Quadros @ 2014-03-26  9:28 UTC (permalink / raw)
  To: balbi
  Cc: linux-usb, linux-kernel, Roger Quadros, 3.9+,
	Sebastian Andrzej Siewior

It was impossible to enumerate on a SuperSpeed (XHCI) host
with alternate setting = 1 due to the wrongly set 'bMaxBurst'
field in the SuperSpeed Endpoint Companion descriptor.

Testcase:
<host> modprobe -r usbtest; modprobe usbtest alt=1
<device> modprobe g_zero
plug device to SuperSpeed port on the host.

Without this patch the host always complains like so
"usb 12-2: Not enough bandwidth for new device state.
 usb 12-2: Not enough bandwidth for altsetting 1"

Bug was introduced by commit cf9a08ae in v3.9

Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 9f170c5..134f354 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -300,7 +300,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
 	ss_opts->isoc_interval = gzero_options.isoc_interval;
 	ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket;
 	ss_opts->isoc_mult = gzero_options.isoc_mult;
-	ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket;
+	ss_opts->isoc_maxburst = gzero_options.isoc_maxburst;
 	ss_opts->bulk_buflen = gzero_options.bulk_buflen;
 
 	func_ss = usb_get_function(func_inst_ss);
-- 
1.8.3.2


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

* Re: [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-03-26  9:28 [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Roger Quadros
@ 2014-03-26 10:50 ` Sebastian Andrzej Siewior
  2014-03-26 13:06 ` Sergei Shtylyov
  2014-03-26 16:46 ` [PATCH v2] " Roger Quadros
  2 siblings, 0 replies; 7+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-03-26 10:50 UTC (permalink / raw)
  To: Roger Quadros, balbi; +Cc: linux-usb, linux-kernel, 3.9+

On 03/26/2014 10:28 AM, Roger Quadros wrote:
> Bug was introduced by commit cf9a08ae in v3.9

I'm sorry for the trouble.

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Sebastian

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

* Re: [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-03-26  9:28 [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Roger Quadros
  2014-03-26 10:50 ` Sebastian Andrzej Siewior
@ 2014-03-26 13:06 ` Sergei Shtylyov
  2014-03-26 14:42   ` Roger Quadros
  2014-03-26 16:46 ` [PATCH v2] " Roger Quadros
  2 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2014-03-26 13:06 UTC (permalink / raw)
  To: Roger Quadros, balbi
  Cc: linux-usb, linux-kernel, 3.9+, Sebastian Andrzej Siewior

Hello.

On 26-03-2014 13:28, Roger Quadros wrote:

> It was impossible to enumerate on a SuperSpeed (XHCI) host
> with alternate setting = 1 due to the wrongly set 'bMaxBurst'
> field in the SuperSpeed Endpoint Companion descriptor.

> Testcase:
> <host> modprobe -r usbtest; modprobe usbtest alt=1
> <device> modprobe g_zero
> plug device to SuperSpeed port on the host.

> Without this patch the host always complains like so
> "usb 12-2: Not enough bandwidth for new device state.
>   usb 12-2: Not enough bandwidth for altsetting 1"

> Bug was introduced by commit cf9a08ae in v3.9

    Please also specify that commit's summary in parens. Also, there's now an 
adopted standard way of saying this:

Fixes: <12-digit SHA ID> ("<summary line>")

> Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Reviewed-by: Felipe Balbi <balbi@ti.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>

WBR, Sergei



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

* Re: [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-03-26 13:06 ` Sergei Shtylyov
@ 2014-03-26 14:42   ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2014-03-26 14:42 UTC (permalink / raw)
  To: Sergei Shtylyov, balbi
  Cc: linux-usb, linux-kernel, 3.9+, Sebastian Andrzej Siewior

On 03/26/2014 03:06 PM, Sergei Shtylyov wrote:
> Hello.
> 
> On 26-03-2014 13:28, Roger Quadros wrote:
> 
>> It was impossible to enumerate on a SuperSpeed (XHCI) host
>> with alternate setting = 1 due to the wrongly set 'bMaxBurst'
>> field in the SuperSpeed Endpoint Companion descriptor.
> 
>> Testcase:
>> <host> modprobe -r usbtest; modprobe usbtest alt=1
>> <device> modprobe g_zero
>> plug device to SuperSpeed port on the host.
> 
>> Without this patch the host always complains like so
>> "usb 12-2: Not enough bandwidth for new device state.
>>   usb 12-2: Not enough bandwidth for altsetting 1"
> 
>> Bug was introduced by commit cf9a08ae in v3.9
> 
>    Please also specify that commit's summary in parens. Also, there's now an adopted standard way of saying this:
> 
> Fixes: <12-digit SHA ID> ("<summary line>")
> 
Right. will send a v2. Thanks.

cheers,
-roger

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

* [PATCH v2] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-03-26  9:28 [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Roger Quadros
  2014-03-26 10:50 ` Sebastian Andrzej Siewior
  2014-03-26 13:06 ` Sergei Shtylyov
@ 2014-03-26 16:46 ` Roger Quadros
  2014-04-22 12:28   ` Roger Quadros
  2 siblings, 1 reply; 7+ messages in thread
From: Roger Quadros @ 2014-03-26 16:46 UTC (permalink / raw)
  To: balbi
  Cc: linux-usb, linux-kernel, bigeasy, sergei.shtylyov, Roger Quadros,
	3.9+

It was impossible to enumerate on a SuperSpeed (XHCI) host
with alternate setting = 1 due to the wrongly set 'bMaxBurst'
field in the SuperSpeed Endpoint Companion descriptor.

Testcase:
<host> modprobe -r usbtest; modprobe usbtest alt=1
<device> modprobe g_zero
plug device to SuperSpeed port on the host.

Without this patch the host always complains like so
"usb 12-2: Not enough bandwidth for new device state.
 usb 12-2: Not enough bandwidth for altsetting 1"

Bug was introduced by commit cf9a08ae in v3.9

Fixes: cf9a08ae5aec (usb: gadget: convert source sink and loopback to
new function interface)

Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
Reviewed-by: Felipe Balbi <balbi@ti.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 9f170c5..134f354 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -300,7 +300,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
 	ss_opts->isoc_interval = gzero_options.isoc_interval;
 	ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket;
 	ss_opts->isoc_mult = gzero_options.isoc_mult;
-	ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket;
+	ss_opts->isoc_maxburst = gzero_options.isoc_maxburst;
 	ss_opts->bulk_buflen = gzero_options.bulk_buflen;
 
 	func_ss = usb_get_function(func_inst_ss);
-- 
1.8.3.2


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

* Re: [PATCH v2] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-03-26 16:46 ` [PATCH v2] " Roger Quadros
@ 2014-04-22 12:28   ` Roger Quadros
  2014-04-22 12:35     ` Roger Quadros
  0 siblings, 1 reply; 7+ messages in thread
From: Roger Quadros @ 2014-04-22 12:28 UTC (permalink / raw)
  To: balbi; +Cc: linux-usb, linux-kernel, bigeasy, sergei.shtylyov, 3.9+

Hi Felipe,

On 03/26/2014 06:46 PM, Roger Quadros wrote:
> It was impossible to enumerate on a SuperSpeed (XHCI) host
> with alternate setting = 1 due to the wrongly set 'bMaxBurst'
> field in the SuperSpeed Endpoint Companion descriptor.
> 
> Testcase:
> <host> modprobe -r usbtest; modprobe usbtest alt=1
> <device> modprobe g_zero
> plug device to SuperSpeed port on the host.
> 
> Without this patch the host always complains like so
> "usb 12-2: Not enough bandwidth for new device state.
>  usb 12-2: Not enough bandwidth for altsetting 1"
> 
> Bug was introduced by commit cf9a08ae in v3.9
> 
> Fixes: cf9a08ae5aec (usb: gadget: convert source sink and loopback to
> new function interface)
> 
> Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
> Reviewed-by: Felipe Balbi <balbi@ti.com>
> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Signed-off-by: Roger Quadros <rogerq@ti.com>

Can you please queue this for -rc fixes? Thanks.

cheers,
-roger

> ---
>  drivers/usb/gadget/zero.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
> index 9f170c5..134f354 100644
> --- a/drivers/usb/gadget/zero.c
> +++ b/drivers/usb/gadget/zero.c
> @@ -300,7 +300,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
>  	ss_opts->isoc_interval = gzero_options.isoc_interval;
>  	ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket;
>  	ss_opts->isoc_mult = gzero_options.isoc_mult;
> -	ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket;
> +	ss_opts->isoc_maxburst = gzero_options.isoc_maxburst;
>  	ss_opts->bulk_buflen = gzero_options.bulk_buflen;
>  
>  	func_ss = usb_get_function(func_inst_ss);
> 


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

* Re: [PATCH v2] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
  2014-04-22 12:28   ` Roger Quadros
@ 2014-04-22 12:35     ` Roger Quadros
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Quadros @ 2014-04-22 12:35 UTC (permalink / raw)
  To: balbi; +Cc: linux-usb, linux-kernel, bigeasy, sergei.shtylyov, 3.9+

Felipe,

Sorry for the noise. I see that they have been applied already.

cheers,
-roger

On 04/22/2014 03:28 PM, Roger Quadros wrote:
> Hi Felipe,
> 
> On 03/26/2014 06:46 PM, Roger Quadros wrote:
>> It was impossible to enumerate on a SuperSpeed (XHCI) host
>> with alternate setting = 1 due to the wrongly set 'bMaxBurst'
>> field in the SuperSpeed Endpoint Companion descriptor.
>>
>> Testcase:
>> <host> modprobe -r usbtest; modprobe usbtest alt=1
>> <device> modprobe g_zero
>> plug device to SuperSpeed port on the host.
>>
>> Without this patch the host always complains like so
>> "usb 12-2: Not enough bandwidth for new device state.
>>  usb 12-2: Not enough bandwidth for altsetting 1"
>>
>> Bug was introduced by commit cf9a08ae in v3.9
>>
>> Fixes: cf9a08ae5aec (usb: gadget: convert source sink and loopback to
>> new function interface)
>>
>> Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
>> Reviewed-by: Felipe Balbi <balbi@ti.com>
>> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
> 
> Can you please queue this for -rc fixes? Thanks.
> 
> cheers,
> -roger
> 
>> ---
>>  drivers/usb/gadget/zero.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
>> index 9f170c5..134f354 100644
>> --- a/drivers/usb/gadget/zero.c
>> +++ b/drivers/usb/gadget/zero.c
>> @@ -300,7 +300,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev)
>>  	ss_opts->isoc_interval = gzero_options.isoc_interval;
>>  	ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket;
>>  	ss_opts->isoc_mult = gzero_options.isoc_mult;
>> -	ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket;
>> +	ss_opts->isoc_maxburst = gzero_options.isoc_maxburst;
>>  	ss_opts->bulk_buflen = gzero_options.bulk_buflen;
>>  
>>  	func_ss = usb_get_function(func_inst_ss);
>>
> 


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

end of thread, other threads:[~2014-04-22 12:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-26  9:28 [PATCH] usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1 Roger Quadros
2014-03-26 10:50 ` Sebastian Andrzej Siewior
2014-03-26 13:06 ` Sergei Shtylyov
2014-03-26 14:42   ` Roger Quadros
2014-03-26 16:46 ` [PATCH v2] " Roger Quadros
2014-04-22 12:28   ` Roger Quadros
2014-04-22 12:35     ` Roger Quadros

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