diff options
author | Bob Liu <lliubbo@gmail.com> | 2011-06-23 17:09:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 17:44:58 -0400 |
commit | 5030ec730279eabafccf862f3c8393af90c258a5 (patch) | |
tree | 764b3555dbaf7157bd3e0313d4f8f138ab64d3a7 | |
parent | 6e7be1a0a87da3c54f0036a1601a58ac0616b2bb (diff) |
USB: gadget: fix req length in sourcesink_setup()
The recent commit 2edb11cbac 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: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/gadget/f_sourcesink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c index caf2f95e0346..5a92883f4c8c 100644 --- a/drivers/usb/gadget/f_sourcesink.c +++ b/drivers/usb/gadget/f_sourcesink.c | |||
@@ -437,6 +437,8 @@ static int sourcesink_setup(struct usb_configuration *c, | |||
437 | u16 w_value = le16_to_cpu(ctrl->wValue); | 437 | u16 w_value = le16_to_cpu(ctrl->wValue); |
438 | u16 w_length = le16_to_cpu(ctrl->wLength); | 438 | u16 w_length = le16_to_cpu(ctrl->wLength); |
439 | 439 | ||
440 | req->length = USB_BUFSIZ; | ||
441 | |||
440 | /* composite driver infrastructure handles everything except | 442 | /* composite driver infrastructure handles everything except |
441 | * the two control test requests. | 443 | * the two control test requests. |
442 | */ | 444 | */ |