]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'dwc3-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2012 17:09:55 +0000 (10:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2012 17:09:55 +0000 (10:09 -0700)
usb: dwc3: patches for v3.5 merge window

This pull request contains one workaround for a Silicon
Issue found on all RTL releases prior to 2.20a, which
would cause a metastability state on Run/Stop bit.

We also have some patches implementing a few extra Standard
requests introduced by USB3 spec (Set SEL and Set Isoch Delay),
as well as one patch, which has been pending for a long time,
implementing LPM support.

Last, but not least, we are splitting the host address space
out of the dwc3 core driver otherwise xHCI won't be able to
request_mem_region() its own address space. This patch is
only needed because we are (as we should) re-using the xHCI
driver, which is a completely separate module.

Together with these three big changes, come a few extra preparatory
patches which most move code around, define macros and so on, as
well as a fix for Isochronous transfers which hasn't been triggered
before.

[ resolved conflicts and build error in drivers/usb/dwc3/gadget.c - gregkh]

1  2 
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c

Simple merge
Simple merge
Simple merge
index 561625a1284d333ddf0dd9ae941eb18bdd73a700,12844393bc3e26cf28dc698d65c31cbbd4a1a83c..3df1a1973b0559d7bb53fd4ce7eb148d25dff1e7
@@@ -966,28 -996,37 +995,37 @@@ static int __dwc3_gadget_ep_queue(struc
  
        list_add_tail(&req->list, &dep->request_list);
  
 -      if (usb_endpoint_xfer_isoc(dep->desc) && (dep->flags & DWC3_EP_BUSY))
++      if (usb_endpoint_xfer_isoc(dep->endpoint.desc) && (dep->flags & DWC3_EP_BUSY))
+               dep->flags |= DWC3_EP_PENDING_REQUEST;
        /*
-        * There is one special case: XferNotReady with
-        * empty list of requests. We need to kick the
-        * transfer here in that situation, otherwise
-        * we will be NAKing forever.
+        * There are two special cases:
+        *
+        * 1. XferNotReady with empty list of requests. We need to kick the
+        *    transfer here in that situation, otherwise we will be NAKing
+        *    forever. If we get XferNotReady before gadget driver has a
+        *    chance to queue a request, we will ACK the IRQ but won't be
+        *    able to receive the data until the next request is queued.
+        *    The following code is handling exactly that.
         *
-        * If we get XferNotReady before gadget driver
-        * has a chance to queue a request, we will ACK
-        * the IRQ but won't be able to receive the data
-        * until the next request is queued. The following
-        * code is handling exactly that.
+        * 2. XferInProgress on Isoc EP with an active transfer. We need to
+        *    kick the transfer here after queuing a request, otherwise the
+        *    core may not see the modified TRB(s).
         */
        if (dep->flags & DWC3_EP_PENDING_REQUEST) {
-               int ret;
-               int start_trans;
+               int     ret;
+               int     start_trans = 1;
+               u8      trans_idx = dep->res_trans_idx;
  
-               start_trans = 1;
 -              if (usb_endpoint_xfer_isoc(dep->desc) &&
 +              if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
-                               (dep->flags & DWC3_EP_BUSY))
+                               (dep->flags & DWC3_EP_BUSY)) {
                        start_trans = 0;
+                       WARN_ON_ONCE(!trans_idx);
+               } else {
+                       trans_idx = 0;
+               }
  
-               ret = __dwc3_gadget_kick_transfer(dep, 0, start_trans);
+               ret = __dwc3_gadget_kick_transfer(dep, trans_idx, start_trans);
                if (ret && ret != -EBUSY) {
                        struct dwc3     *dwc = dep->dwc;