Skip to contentSkip to conversation

usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1

PATCH Superseded Roger Quadros 3 participants 7 messages Mar 26, 2014 – Apr 22, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1

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+ <[email protected]> # 3.9+
Cc Sebastian Andrzej Siewior <[email protected]>
---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
index 9f170c5..134f354 100644
@@ -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);
Signature · 1 line
1.8.3.2
#2 lore raw
In reply to Roger Quadros

Hello.

Quoted 9 lines · Roger Quadros

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.

Quoted 5 lines

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>")
Quoted 4 lines
Cc 3.9+ <[email protected]> # 3.9+
Cc Sebastian Andrzej Siewior <[email protected]>

WBR, Sergei

#3 lore raw
Quoted 17 lines · Sergei Shtylyov

Hello.

Quoted 12 lines · Roger Quadros

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"

Quoted 6 lines
Quoted 1 line

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

#4 lore raw

PATCH v2 1/1 usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1

In reply to Roger Quadros

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)

---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
index 9f170c5..134f354 100644
@@ -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);
Signature · 1 line
1.8.3.2
#5 lore raw

Hi Felipe,

Quoted 15 lines · Roger Quadros

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

Quoted 7 lines
Fixes cf9a08ae5aec (usb: gadget: convert source sink and loopback to

new function interface)

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

cheers,
-roger

Quoted 18 lines
---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
index 9f170c5..134f354 100644
@@ -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);
#6 lore raw

Felipe,

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

cheers,
-roger

Quoted 50 lines · Roger Quadros

Hi Felipe,

Quoted 15 lines · Roger Quadros

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

Quoted 7 lines
Fixes cf9a08ae5aec (usb: gadget: convert source sink and loopback to

new function interface)

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

cheers,
-roger

Quoted 18 lines
---
 drivers/usb/gadget/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
index 9f170c5..134f354 100644
@@ -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);