usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
Subsystems (2)
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
--- drivers/usb/gadget/zero.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
@@ -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
Quoted 1 line · Roger Quadros
Bug was introduced by commit
cf9a08aein v3.9
I'm sorry for the trouble.
Sebastian
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> modprobeg_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
cf9a08aein v3.9
Please also specify that commit's summary in parens. Also, there's now an
adopted standard way of saying this:
Quoted 4 lines
Cc 3.9+ <[email protected]> # 3.9+Cc Sebastian Andrzej Siewior <[email protected]>Reviewed-by Felipe Balbi <[email protected]>Signed-off-by Roger Quadros <[email protected]>
WBR, Sergei
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> modprobeg_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
cf9a08aein v3.9Please 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
PATCH v2 1/1 usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
In reply to Roger QuadrosIt 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
new function interface)
--- drivers/usb/gadget/zero.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/zero.c +1 -1
@@ -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
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> modprobeg_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
cf9a08aein v3.9
Quoted 7 lines
Fixes cf9a08ae5aec (usb: gadget: convert source sink and loopback tonew function interface)
Cc 3.9+ <[email protected]> # 3.9+Reviewed-by Felipe Balbi <[email protected]>Signed-off-by Roger Quadros <[email protected]>
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@@ -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);
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> modprobeg_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
cf9a08aein v3.9Quoted 7 lines
Fixes cf9a08ae5aec (usb: gadget: convert source sink and loopback tonew function interface)
Cc 3.9+ <[email protected]> # 3.9+Reviewed-by Felipe Balbi <[email protected]>Signed-off-by Roger Quadros <[email protected]>Can you please queue this for -rc fixes? Thanks.
cheers,
-rogerQuoted 18 lines
--- drivers/usb/gadget/zero.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/gadget/zero.c +1
-1@@ -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);