Commit 5030ec73 authored by Bob Liu's avatar Bob Liu Committed by Greg Kroah-Hartman

USB: gadget: fix req length in sourcesink_setup()

The recent commit 2edb11cb fixed req->length in the composite_setup()
function, but that will cause all g_zero tests to fail like:

root#> ./testusb -D /proc/bus/usb/002/021 -t14 -c 15000 -s 256 -v 1
unknown speed   /proc/bus/usb/002/021
/proc/bus/usb/002/021 test 14 --> 32 (Broken pipe)

We need to fix req->length in sourcesink_setup() as well to avoid this.
Signed-off-by: default avatarBob Liu <lliubbo@gmail.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6e7be1a0
...@@ -437,6 +437,8 @@ static int sourcesink_setup(struct usb_configuration *c, ...@@ -437,6 +437,8 @@ static int sourcesink_setup(struct usb_configuration *c,
u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength); u16 w_length = le16_to_cpu(ctrl->wLength);
req->length = USB_BUFSIZ;
/* composite driver infrastructure handles everything except /* composite driver infrastructure handles everything except
* the two control test requests. * the two control test requests.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment