]> git.baikalelectronics.ru Git - kernel.git/commit
USB: dummy-hcd: accept mismatch between wLength and transfer length
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 22 Jul 2009 18:44:17 +0000 (14:44 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Sep 2009 13:46:30 +0000 (06:46 -0700)
commit5730c854dba8a093a8faa7d3b46f6ff6cd13d171
treef3f4c128dbfe927bea1935a81c84c7b493707a4d
parent34e440c0feb284f9ef8e0c28c74ca466ee5890bb
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>
drivers/usb/gadget/dummy_hcd.c