]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Oct 2014 19:03:21 +0000 (12:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Oct 2014 19:03:21 +0000 (12:03 -0700)
added patches:
usb-dwc3-fix-trb-completion-when-multiple-trbs-are-started.patch

queue-3.14/series
queue-3.14/usb-dwc3-fix-trb-completion-when-multiple-trbs-are-started.patch [new file with mode: 0644]

index 7bc1673d599e3cbc631bb60c16d3a2556af555aa..a3c04affbcce57265847478ce5945215a0d80fc4 100644 (file)
@@ -174,3 +174,4 @@ rtlwifi-rtl8192cu-add-new-id.patch
 lockd-fix-rpcbind-crash-on-lockd-startup-failure.patch
 lockdep-revert-lockdep-check-in-raw_seqcount_begin.patch
 genhd-fix-leftover-might_sleep-in-blk_free_devt.patch
+usb-dwc3-fix-trb-completion-when-multiple-trbs-are-started.patch
diff --git a/queue-3.14/usb-dwc3-fix-trb-completion-when-multiple-trbs-are-started.patch b/queue-3.14/usb-dwc3-fix-trb-completion-when-multiple-trbs-are-started.patch
new file mode 100644 (file)
index 0000000..1910b3a
--- /dev/null
@@ -0,0 +1,60 @@
+From 0b93a4c838fa10370d72f86fe712426ac63804de Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <balbi@ti.com>
+Date: Thu, 4 Sep 2014 10:28:10 -0500
+Subject: usb: dwc3: fix TRB completion when multiple TRBs are started
+
+From: Felipe Balbi <balbi@ti.com>
+
+commit 0b93a4c838fa10370d72f86fe712426ac63804de upstream.
+
+After commit 2ec2a8be (usb: dwc3: gadget:
+always enable IOC on bulk/interrupt transfers)
+we created a situation where it was possible to
+hang a bulk/interrupt endpoint if we had more
+than one pending request in our queue and they
+were both started with a single Start Transfer
+command.
+
+The problems triggers because we had not enabled
+Transfer In Progress event for those endpoints
+and we were not able to process early giveback
+of requests completed without LST bit set.
+
+Fix the problem by finally enabling Xfer In Progress
+event for all endpoint types, except control.
+
+Fixes: 2ec2a8be (usb: dwc3: gadget: always
+       enable IOC on bulk/interrupt transfers)
+Reported-by: Pratyush Anand <pratyush.anand@st.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ drivers/usb/dwc3/gadget.c |    8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -445,7 +445,7 @@ static int dwc3_gadget_set_ep_config(str
+               dep->stream_capable = true;
+       }
+-      if (usb_endpoint_xfer_isoc(desc))
++      if (!usb_endpoint_xfer_control(desc))
+               params.param1 |= DWC3_DEPCFG_XFER_IN_PROGRESS_EN;
+       /*
+@@ -1937,12 +1937,6 @@ static void dwc3_endpoint_interrupt(stru
+               dwc3_endpoint_transfer_complete(dwc, dep, event, 1);
+               break;
+       case DWC3_DEPEVT_XFERINPROGRESS:
+-              if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
+-                      dev_dbg(dwc->dev, "%s is not an Isochronous endpoint\n",
+-                                      dep->name);
+-                      return;
+-              }
+-
+               dwc3_endpoint_transfer_complete(dwc, dep, event, 0);
+               break;
+       case DWC3_DEPEVT_XFERNOTREADY: