diff options
author | Martin Cerveny <M.Cerveny@computer.org> | 2017-02-13 17:23:47 +0100 |
---|---|---|
committer | popcornmix <popcornmix@gmail.com> | 2017-02-13 16:31:15 +0000 |
commit | 3273ed969add6d80fcaacc9a1756b6f544c8194a (patch) | |
tree | 1c847f25dd25c285b6fe0ee81c1c7108ce319e6c | |
parent | fb50a274e277b6e25588bf96fd8ed8814f4d95c6 (diff) |
dwc_otg: fix summarize urb->actual_length for isochronous transfersraspberrypi-kernel_1.20170215-1
Kernel does not copy input data of ISO transfers to userspace
if actual_length is set only in ISO transfers and not summarized
in urb->actual_length. Fixes raspberrypi/linux#903
-rw-r--r-- | drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c index 2ceed4212980..5011750a1b4e 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -325,10 +325,12 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, int i; urb->error_count = dwc_otg_hcd_urb_get_error_count(dwc_otg_urb); + urb->actual_length = 0; for (i = 0; i < urb->number_of_packets; ++i) { urb->iso_frame_desc[i].actual_length = dwc_otg_hcd_urb_get_iso_desc_actual_length (dwc_otg_urb, i); + urb->actual_length += urb->iso_frame_desc[i].actual_length; urb->iso_frame_desc[i].status = dwc_otg_hcd_urb_get_iso_desc_status(dwc_otg_urb, i); } |