1. 11 4月, 2017 4 次提交
  2. 24 1月, 2017 1 次提交
    • B
      usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase · 53896798
      Baolin Wang 提交于
      When handing the SETUP packet by composite_setup(), we will release the
      dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup
      function, which means we need to delay handling the STATUS phase.
      
      But during the lock release period, maybe the request for handling delay
      STATUS phase has been queued into list before we set 'dwc->delayed_status'
      flag or entering 'EP0_STATUS_PHASE' phase, then we will miss the chance
      to handle the STATUS phase. Thus we should check if the request for delay
      STATUS phase has been enqueued when entering 'EP0_STATUS_PHASE' phase in
      dwc3_ep0_xfernotready(), if so, we should handle it.
      Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      53896798
  3. 02 1月, 2017 2 次提交
  4. 18 11月, 2016 2 次提交
  5. 08 11月, 2016 1 次提交
  6. 03 11月, 2016 2 次提交
  7. 31 10月, 2016 3 次提交
  8. 20 6月, 2016 6 次提交
  9. 28 4月, 2016 1 次提交
  10. 18 4月, 2016 1 次提交
  11. 14 4月, 2016 2 次提交
  12. 04 3月, 2016 1 次提交
  13. 17 2月, 2016 1 次提交
    • J
      usb: dwc3: Fix assignment of EP transfer resources · c4509601
      John Youn 提交于
      The assignement of EP transfer resources was not handled properly in the
      dwc3 driver. Commit aebda618 ("usb: dwc3: Reset the transfer
      resource index on SET_INTERFACE") previously fixed one aspect of this
      where resources may be exhausted with multiple calls to SET_INTERFACE.
      However, it introduced an issue where composite devices with multiple
      interfaces can be assigned the same transfer resources for different
      endpoints. This patch solves both issues.
      
      The assignment of transfer resources cannot perfectly follow the data
      book due to the fact that the controller driver does not have all
      knowledge of the configuration in advance. It is given this information
      piecemeal by the composite gadget framework after every
      SET_CONFIGURATION and SET_INTERFACE. Trying to follow the databook
      programming model in this scenario can cause errors. For two reasons:
      
      1) The databook says to do DEPSTARTCFG for every SET_CONFIGURATION and
      SET_INTERFACE (8.1.5). This is incorrect in the scenario of multiple
      interfaces.
      
      2) The databook does not mention doing more DEPXFERCFG for new endpoint
      on alt setting (8.1.6).
      
      The following simplified method is used instead:
      
      All hardware endpoints can be assigned a transfer resource and this
      setting will stay persistent until either a core reset or hibernation.
      So whenever we do a DEPSTARTCFG(0) we can go ahead and do DEPXFERCFG for
      every hardware endpoint as well. We are guaranteed that there are as
      many transfer resources as endpoints.
      
      This patch triggers off of the calling dwc3_gadget_start_config() for
      EP0-out, which always happens first, and which should only happen in one
      of the above conditions.
      
      Fixes: aebda618 ("usb: dwc3: Reset the transfer resource index on SET_INTERFACE")
      Cc: <stable@vger.kernel.org> # v3.2+
      Reported-by: NRavi Babu <ravibabu@ti.com>
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@kernel.org>
      c4509601
  14. 15 12月, 2015 2 次提交
  15. 31 7月, 2015 6 次提交
  16. 22 7月, 2015 1 次提交
    • J
      usb: dwc3: Reset the transfer resource index on SET_INTERFACE · aebda618
      John Youn 提交于
      This fixes an issue introduced in commit b23c8439 (usb: dwc3:
      gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would
      only use DEPSTARTCFG once per SetConfig.
      
      The trick is that we should use one DEPSTARTCFG per SetConfig *OR*
      SetInterface. SetInterface was completely missed from the original
      patch.
      
      This problem became aparent after commit 76e838c9 (usb: dwc3:
      gadget: return error if command sent to DEPCMD register fails)
      added checking of the return status of device endpoint commands.
      
      'Set Endpoint Transfer Resource' command was caught failing
      occasionally. This is because the Transfer Resource
      Index was not getting reset during a SET_INTERFACE request.
      
      Finally, to fix the issue, was we have to do is make sure that
      our start_config_issued flag gets reset whenever we receive a
      SetInterface request.
      
      To verify the problem (and its fix), all we have to do is run
      test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'.
      Tested-by: NHuang Rui <ray.huang@amd.com>
      Tested-by: NSubbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
      Fixes: b23c8439 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs)
      Cc: <stable@vger.kernel.org> # v3.2+
      Signed-off-by: NJohn Youn <johnyoun@synopsys.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      aebda618
  17. 30 1月, 2015 1 次提交
  18. 11 11月, 2014 1 次提交
    • F
      usb: dwc3: ep0: fix for dead code · 520fe763
      Felipe Balbi 提交于
      commit 6856d30c (usb: dwc3: ep0: return early
      on NULL requests) tried to fix a minor corner
      case where we could dereference a NULL pointer
      but it also ended up introducing some dead code.
      
      Unfortunately, that dead code, if reached, could
      end up starving the endpoint request list because
      a request would never be given back when it should.
      
      Fix this by moving the check for empty request list
      before its first use.
      Reported-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      520fe763
  19. 06 11月, 2014 1 次提交
  20. 04 11月, 2014 1 次提交