]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Nov 2016 11:22:43 +0000 (12:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Nov 2016 11:22:43 +0000 (12:22 +0100)
added patches:
usb-dwc3-gadget-properly-account-queued-requests.patch

queue-4.8/series
queue-4.8/usb-dwc3-gadget-properly-account-queued-requests.patch [new file with mode: 0644]

index d0d940050da8cf6d6d153229c8c8d0b993391d61..3630a6c4ce43fb5b2942dcb5a3288c4f857ad1c9 100644 (file)
@@ -32,3 +32,4 @@ sctp-validate-chunk-len-before-actually-using-it.patch
 ip6_tunnel-update-skb-protocol-to-eth_p_ipv6-in-ip6_tnl_xmit.patch
 packet-on-direct_xmit-limit-tso-and-csum-to-supported-devices.patch
 arch-powerpc-update-parameters-for-csum_tcpudp_magic-csum_tcpudp_nofold.patch
+usb-dwc3-gadget-properly-account-queued-requests.patch
diff --git a/queue-4.8/usb-dwc3-gadget-properly-account-queued-requests.patch b/queue-4.8/usb-dwc3-gadget-properly-account-queued-requests.patch
new file mode 100644 (file)
index 0000000..b94586f
--- /dev/null
@@ -0,0 +1,51 @@
+From a9c3ca5fae6bf73770f0576eaf57d5f1305ef4b3 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <felipe.balbi@linux.intel.com>
+Date: Wed, 5 Oct 2016 14:24:37 +0300
+Subject: usb: dwc3: gadget: properly account queued requests
+
+From: Felipe Balbi <felipe.balbi@linux.intel.com>
+
+commit a9c3ca5fae6bf73770f0576eaf57d5f1305ef4b3 upstream.
+
+Some requests could be accounted for multiple
+times. Let's fix that so each and every requests is
+accounted for only once.
+
+Fixes: 55a0237f8f47 ("usb: dwc3: gadget: use allocated/queued reqs for LST bit")
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/gadget.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -789,6 +789,7 @@ static void dwc3_prepare_one_trb(struct
+               req->trb = trb;
+               req->trb_dma = dwc3_trb_dma_offset(dep, trb);
+               req->first_trb_index = dep->trb_enqueue;
++              dep->queued_requests++;
+       }
+       dwc3_ep_inc_enq(dep);
+@@ -841,8 +842,6 @@ static void dwc3_prepare_one_trb(struct
+       trb->ctrl |= DWC3_TRB_CTRL_HWO;
+-      dep->queued_requests++;
+-
+       trace_dwc3_prepare_trb(dep, trb);
+ }
+@@ -1963,7 +1962,9 @@ static int __dwc3_cleanup_done_trbs(stru
+       unsigned int            s_pkt = 0;
+       unsigned int            trb_status;
+-      dep->queued_requests--;
++      if (req->trb == trb)
++              dep->queued_requests--;
++
+       trace_dwc3_complete_trb(dep, trb);
+       /*