1. 24 Sep, 2020 2 commits
    • Thinh Nguyen's avatar
      usb: dwc3: gadget: END_TRANSFER before CLEAR_STALL command · d97c78a1
      Thinh Nguyen authored
      According the programming guide (for all DWC3 IPs), when the driver
      handles ClearFeature(halt) request, it should issue CLEAR_STALL command
      _after_ the END_TRANSFER command completes. The END_TRANSFER command may
      take some time to complete. So, delay the ClearFeature(halt) request
      control status stage and wait for END_TRANSFER command completion
      interrupt. Only after END_TRANSFER command completes that the driver
      may issue CLEAR_STALL command.
      
      Cc: stable@vger.kernel.org
      Fixes: cb11ea56 ("usb: dwc3: gadget: Properly handle ClearFeature(halt)")
      Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      d97c78a1
    • Thinh Nguyen's avatar
      usb: dwc3: gadget: Resume pending requests after CLEAR_STALL · c503672a
      Thinh Nguyen authored
      The function driver may queue new requests right after halting the
      endpoint (i.e. queue new requests while the endpoint is stalled).
      There's no restriction preventing it from doing so. However, dwc3
      currently drops those requests after CLEAR_STALL. The driver should only
      drop started requests. Keep the pending requests in the pending list to
      resume and process them after the host issues ClearFeature(Halt) to the
      endpoint.
      
      Cc: stable@vger.kernel.org
      Fixes: cb11ea56 ("usb: dwc3: gadget: Properly handle ClearFeature(halt)")
      Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      c503672a
  2. 20 Sep, 2020 20 commits
  3. 19 Sep, 2020 18 commits