1. 23 12月, 2015 1 次提交
  2. 17 12月, 2015 1 次提交
  3. 15 12月, 2015 5 次提交
    • F
      usb: dwc3: gadget: handle request->zero · 04c03d10
      Felipe Balbi 提交于
      So far, dwc3 has always missed request->zero
      handling for every endpoint. Let's implement
      that so we can handle cases where transfer must
      be finished with a ZLP.
      
      Note that dwc3 is a little special. Even though
      we're dealing with a ZLP, we still need a buffer
      of wMaxPacketSize bytes; to hide that detail from
      every gadget driver, we have a preallocated buffer
      of 1024 bytes (biggest bulk size) to use (and
      share) among all endpoints.
      Reported-by: NRavi B <ravibabu@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      04c03d10
    • F
      usb: dwc3: ep0: fix setup_packet_pending initialization · b5d335e5
      Felipe Balbi 提交于
      It just ocurred to me that dwc3 already gives a
      really hint of when a setup packet is pending and
      that's the SETUP_PENDING TRB Status for EP0 IRQs.
      
      Fix setup_packet_pending initialization based on
      that. While at that, also make sure the comment in
      gadget.c matches what code is doing.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b5d335e5
    • F
      usb: dwc3: gadget: simplify next_request() return check · ac7bdcc1
      Felipe Balbi 提交于
      In dwc3_cleanup_done_reqs() we expect that all
      iterations of our while (1) loop will find a valid
      struct dwc3_request *. In case we don't, we're
      dumping a WARN_ON_ONCE() splat so that people report
      the failure.
      
      This patch is a simple cleanup converting:
      
      	if (!req) {
      		WARN_ON_ONCE(1);
      		return 1;
      	}
      
      to:
      
      	if (WARN_ON_ONCE(!req))
      		return 1;
      
      which is a little easier to read.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ac7bdcc1
    • F
      usb: dwc3: gadget: purge dev_dbg() calls · ec5e795c
      Felipe Balbi 提交于
      The last few dev_dbg() messages are converted to
      tracepoints and we can finally ignore dev_dbg()
      messages during debug sessions.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ec5e795c
    • F
      usb: dwc3: gadget: simplify dwc3_gadget_ep_queue() · bb423984
      Felipe Balbi 提交于
      By moving our sanity checks our internal function
      __dwc3_gadget_ep_queue() we can simplify the
      externally visible API while also making sure that
      callers of __dwc3_gadget_ep_queue() also make use of
      the same checks.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      bb423984
  4. 01 12月, 2015 1 次提交
    • F
      usb: dwc3: gadget: don't prestart interrupt endpoints · 62e345ae
      Felipe Balbi 提交于
      Because interrupt endpoints usually transmit such
      small amounts of data, it seems pointless to prestart
      transfers and try to get speed improvements. This
      patch also sorts out a problem with CDC ECM function
      where its notification endpoint gets stuck in busy
      state and we continuously issue Update Transfer
      commands.
      
      Fixes: 8a1a9c9e ("usb: dwc3: gadget: start transfer on XFER_COMPLETE")
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      62e345ae
  5. 18 11月, 2015 1 次提交
    • B
      usb: dwc3: gadget: let us set lower max_speed · b9e51b2b
      Ben McCauley 提交于
      In some SoCs, dwc3 is implemented as a USB2.0 only
      core, meaning that it can't ever achieve SuperSpeed.
      
      Currect driver always sets gadget.max_speed to
      USB_SPEED_SUPER unconditionally. This can causes
      issues to some Host stacks where the host will issue
      a GetBOS() request and we will reply with a BOS
      containing Superspeed Capability Descriptor.
      
      At least Windows seems to be upset by this fact and
      prints a warning that we should connect $this device
      to another port.
      
      [ balbi@ti.com : rewrote entire commit, including
      source code comment to make a lot clearer what the
      problem is ]
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NBen McCauley <ben.mccauley@garmin.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      b9e51b2b
  6. 13 10月, 2015 2 次提交
  7. 29 9月, 2015 4 次提交
  8. 27 9月, 2015 4 次提交
  9. 22 9月, 2015 1 次提交
  10. 05 8月, 2015 1 次提交
  11. 31 7月, 2015 1 次提交
  12. 29 7月, 2015 2 次提交
  13. 29 5月, 2015 1 次提交
  14. 26 5月, 2015 2 次提交
  15. 09 3月, 2015 1 次提交
  16. 30 1月, 2015 2 次提交
  17. 28 1月, 2015 3 次提交
  18. 15 1月, 2015 2 次提交
    • A
      usb: dwc3: gadget: Stop TRB preparation after limit is reached · 39e60635
      Amit Virdi 提交于
      DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This
      means, the max TRBs that can be submitted for an EP is fixed to 32. Since the
      request queue for an EP is a linked list, any number of requests can be queued
      to it by the gadget layer.  However, the dwc3 driver must not submit TRBs more
      than the pool it has created for. This limit wasn't respected when SG was used
      resulting in submitting more than the max TRBs, eventually leading to
      non-transfer of the TRBs submitted over the max limit.
      
      Root cause:
      When SG is used, there are two loops iterating to prepare TRBs:
       - Outer loop over the request_list
       - Inner loop over the SG list
      The code was missing break to get out of the outer loop.
      
      Fixes: eeb720fb (usb: dwc3: gadget: add support for SG lists)
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: NAmit Virdi <amit.virdi@st.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      39e60635
    • A
      usb: dwc3: gadget: Fix TRB preparation during SG · ec512fb8
      Amit Virdi 提交于
      When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3
      request (dwc3_request). So while preparing TRBs, the 'last' flag should be set
      only when it is the last TRB being prepared from the last dwc3_request entry.
      
      The current implementation uses list_is_last to check if the dwc3_request is the
      last entry from the request_list. However, list_is_last returns false for the
      last entry too. This is because, while preparing the first TRB from a request,
      the function dwc3_prepare_one_trb modifies the request's next and prev pointers
      while moving the URB to req_queued. Hence, list_is_last always returns false no
      matter what.
      
      The correct way is not to access the modified pointers of dwc3_request but to
      use list_empty macro instead.
      
      Fixes: e5ba5ec8 (usb: dwc3: gadget: fix scatter gather implementation)
      Signed-off-by: NAmit Virdi <amit.virdi@st.com>
      Cc: <stable@vger.kernel.org> # v3.9+
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ec512fb8
  19. 13 1月, 2015 2 次提交
  20. 11 11月, 2014 1 次提交
  21. 04 11月, 2014 2 次提交
    • H
      usb: dwc3: make HIRD threshold configurable · 460d098c
      Huang Rui 提交于
      HIRD threshold should be configurable by different platforms.
      
      From DesignWare databook:
      When HIRD_Threshold[4] is set to 1b1 and HIRD value is greater than or
      equal to the value in HIRD_Threshold[3:0], dwc3 asserts output signals
      utmi_l1_suspend_n to put PHY into Deep Low-Power mode in L1.
      
      When HIRD_Threshold[4] is set to 1b0 or the HIRD value is less than
      HIRD_Threshold[3:0], dwc3 asserts output signals utmi_sleep_n on L1.
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      460d098c
    • H
      usb: dwc3: add lpm erratum support · 80caf7d2
      Huang Rui 提交于
      When parameter DWC_USB3_LPM_ERRATA_ENABLE is enabled in Andvanced
      Configuration of coreConsultant, it supports of xHCI BESL Errata Dated
      10/19/2011 is enabled in host mode. In device mode it adds the capability
      to send NYET response threshold based on the BESL value received in the LPM
      token, and the threhold is configurable for each soc platform.
      
      This patch adds an entry that soc platform is able to define the lpm
      capacity with their own device tree or bus glue layer.
      
      [ balbi@ti.com : added devicetree documentation, spelled threshold
      		completely, made sure threshold is only applied to
      		proper core revisions. ]
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      80caf7d2