linux/drivers/usb/core
Alan Stern 2ef47001b3 USB: usbfs: compute urb->actual_length for isochronous
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>
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-09 13:02:23 +01:00
..
buffer.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
config.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
devices.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
devio.c USB: usbfs: compute urb->actual_length for isochronous 2017-11-09 13:02:23 +01:00
driver.c usb: core: introduce a new usb_get_std_status() helper 2017-11-07 15:47:19 +01:00
endpoint.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
file.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
generic.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
hcd-pci.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
hcd.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
hub.c usb: core: introduce a new usb_get_std_status() helper 2017-11-07 15:47:19 +01:00
hub.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
Kconfig docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
ledtrig-usbport.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
Makefile usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
message.c usb: core: message: remember to reset 'ret' to 0 when necessary 2017-11-09 13:02:23 +01:00
notify.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
of.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
otg_whitelist.h USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
port.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
quirks.c USB: Add delay-init quirk for Corsair K70 LUX keyboards 2017-11-04 11:58:01 +01:00
sysfs.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
urb.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
usb-acpi.c USB: core: Remove redundant license text 2017-11-04 11:55:39 +01:00
usb.c USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00
usb.h USB: core: move existing SPDX tags to top of the file 2017-11-03 10:12:26 +01:00