diff options
| author | 2022-11-10 01:30:05 -0500 | |
|---|---|---|
| committer | 2022-11-22 16:51:26 +0100 | |
| commit | b25264f22b498dff3fa5c70c9bea840e83fff0d1 (patch) | |
| tree | 1e03ea2130c831474df45da4573c98cada379cc4 /drivers/usb/cdns3/cdnsp-ring.c | |
| parent | usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer (diff) | |
| download | wireguard-linux-b25264f22b498dff3fa5c70c9bea840e83fff0d1.tar.xz wireguard-linux-b25264f22b498dff3fa5c70c9bea840e83fff0d1.zip | |
usb: cdnsp: Fix issue with Clear Feature Halt Endpoint
During handling Clear Halt Endpoint Feature request, driver invokes
Reset Endpoint command. Because this command has some issue with
transition endpoint from Running to Idle state the driver must
stop the endpoint by using Stop Endpoint command.
cc: <stable@vger.kernel.org>
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20221110063005.370656-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-ring.c')
| -rw-r--r-- | drivers/usb/cdns3/cdnsp-ring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c index 794e413800ae..04dfcaa08dc4 100644 --- a/drivers/usb/cdns3/cdnsp-ring.c +++ b/drivers/usb/cdns3/cdnsp-ring.c @@ -2076,7 +2076,8 @@ int cdnsp_cmd_stop_ep(struct cdnsp_device *pdev, struct cdnsp_ep *pep) u32 ep_state = GET_EP_CTX_STATE(pep->out_ctx); int ret = 0; - if (ep_state == EP_STATE_STOPPED || ep_state == EP_STATE_DISABLED) { + if (ep_state == EP_STATE_STOPPED || ep_state == EP_STATE_DISABLED || + ep_state == EP_STATE_HALTED) { trace_cdnsp_ep_stopped_or_disabled(pep->out_ctx); goto ep_stopped; } |
