diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-07-22 22:44:17 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 17:46:30 +0400 |
commit | e9238221d3fef990e2fd01702ebe5af90dda52a2 (patch) | |
tree | f3f4c128dbfe927bea1935a81c84c7b493707a4d /drivers | |
parent | 527101ce6a96c037a2555aa43222faa6fdd21e97 (diff) | |
download | linux-e9238221d3fef990e2fd01702ebe5af90dda52a2.tar.xz |
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')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 5 |
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: setup = *(struct usb_ctrlrequest*) urb->setup_packet; w_index = le16_to_cpu(setup.wIndex); w_value = le16_to_cpu(setup.wValue); - if (le16_to_cpu(setup.wLength) != - urb->transfer_buffer_length) { - status = -EOVERFLOW; - goto return_urb; - } /* paranoia, in case of stale queued data */ list_for_each_entry (req, &ep->queue, queue) { |