diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2017-11-08 12:23:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-21 09:21:23 +0100 |
commit | 965003b311e0ed764eb6c0d6f86fe14a57d43286 (patch) | |
tree | f1e6c7596ab57998822e71111237b3eb6d743ee7 /Makefile | |
parent | 834a5d880a54008e62ba501785337b7f51c43b39 (diff) | |
download | linux-stable-965003b311e0ed764eb6c0d6f86fe14a57d43286.tar.gz linux-stable-965003b311e0ed764eb6c0d6f86fe14a57d43286.tar.bz2 linux-stable-965003b311e0ed764eb6c0d6f86fe14a57d43286.zip |
USB: usbfs: compute urb->actual_length for isochronous
commit 2ef47001b3ee3ded579b7532ebdcf8680e4d8c54 upstream.
The USB kerneldoc says that the actual_length field "is read in
non-iso completion functions", but the usbfs driver uses it for all
URB types in processcompl(). Since not all of the host controller
drivers set actual_length for isochronous URBs, programs using usbfs
with some host controllers don't work properly. For example, Minas
reports that a USB camera controlled by libusb doesn't work properly
with a dwc2 controller.
It doesn't seem worthwhile to change the HCDs and the documentation,
since the in-kernel USB class drivers evidently don't rely on
actual_length for isochronous transfers. The easiest solution is for
usbfs to calculate the actual_length value for itself, by adding up
the lengths of the individual packets in an isochronous transfer.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Reported-and-tested-by: wlf <wulf@rock-chips.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions