brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0590-dwc_otg-fix-summarize-urb-actual_length-for-isochron.patch
1 From 83672d68ed0199fbe119510626116a32622e4003 Mon Sep 17 00:00:00 2001
2 From: Martin Cerveny <M.Cerveny@computer.org>
3 Date: Mon, 13 Feb 2017 17:23:47 +0100
4 Subject: [PATCH] dwc_otg: fix summarize urb->actual_length for isochronous
5 transfers
6
7 Kernel does not copy input data of ISO transfers to userspace
8 if actual_length is set only in ISO transfers and not summarized
9 in urb->actual_length. Fixes raspberrypi/linux#903
10 ---
11 drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 2 ++
12 1 file changed, 2 insertions(+)
13
14 diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
15 index 2ceed42..5011750 100644
16 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
17 +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
18 @@ -325,10 +325,12 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle,
19 int i;
20
21 urb->error_count = dwc_otg_hcd_urb_get_error_count(dwc_otg_urb);
22 + urb->actual_length = 0;
23 for (i = 0; i < urb->number_of_packets; ++i) {
24 urb->iso_frame_desc[i].actual_length =
25 dwc_otg_hcd_urb_get_iso_desc_actual_length
26 (dwc_otg_urb, i);
27 + urb->actual_length += urb->iso_frame_desc[i].actual_length;
28 urb->iso_frame_desc[i].status =
29 dwc_otg_hcd_urb_get_iso_desc_status(dwc_otg_urb, i);
30 }
31 --
32 2.1.4
33