aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-07-22 14:44:17 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:30 -0400
commite9238221d3fef990e2fd01702ebe5af90dda52a2 (patch)
treef3f4c128dbfe927bea1935a81c84c7b493707a4d /drivers/usb/gadget/dummy_hcd.c
parent527101ce6a96c037a2555aa43222faa6fdd21e97 (diff)
USB: dummy-hcd: accept mismatch between wLength and transfer length
This patch (as1269) fixes a bug in the way dummy_hcd handles control URBs. Currently it returns a -EOVERFLOW error if the wLength value in the setup packet is different from the URB's transfer_buffer_length. Other host controller drivers don't do this. There's no reason the two length values have to be equal, and in fact they sometimes aren't -- a driver might set the transfer length to the maxpacket value in order to handle buggy devices that don't respect wLength. This patch simply removes the unnecessary check and error return. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index a56b24d305f8..5e0966485188 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1306,11 +1306,6 @@ restart:
1306 setup = *(struct usb_ctrlrequest*) urb->setup_packet; 1306 setup = *(struct usb_ctrlrequest*) urb->setup_packet;
1307 w_index = le16_to_cpu(setup.wIndex); 1307 w_index = le16_to_cpu(setup.wIndex);
1308 w_value = le16_to_cpu(setup.wValue); 1308 w_value = le16_to_cpu(setup.wValue);
1309 if (le16_to_cpu(setup.wLength) !=
1310 urb->transfer_buffer_length) {
1311 status = -EOVERFLOW;
1312 goto return_urb;
1313 }
1314 1309
1315 /* paranoia, in case of stale queued data */ 1310 /* paranoia, in case of stale queued data */
1316 list_for_each_entry (req, &ep->queue, queue) { 1311 list_for_each_entry (req, &ep->queue, queue) {