mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
usb: dwc3: ep0: Clear started flag on completion
Clear ep0's DWC3_EP_TRANSFER_STARTED flag if the END_TRANSFER command is completed. Otherwise, we can't start control transfer again after END_TRANSFER. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen <thinhn@synopsys.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
d3abda5a98
commit
2d7b78f59e
1 changed files with 8 additions and 0 deletions
|
@ -1117,6 +1117,9 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
|
|||
void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
||||
const struct dwc3_event_depevt *event)
|
||||
{
|
||||
struct dwc3_ep *dep = dwc->eps[event->endpoint_number];
|
||||
u8 cmd;
|
||||
|
||||
switch (event->endpoint_event) {
|
||||
case DWC3_DEPEVT_XFERCOMPLETE:
|
||||
dwc3_ep0_xfer_complete(dwc, event);
|
||||
|
@ -1129,7 +1132,12 @@ void dwc3_ep0_interrupt(struct dwc3 *dwc,
|
|||
case DWC3_DEPEVT_XFERINPROGRESS:
|
||||
case DWC3_DEPEVT_RXTXFIFOEVT:
|
||||
case DWC3_DEPEVT_STREAMEVT:
|
||||
break;
|
||||
case DWC3_DEPEVT_EPCMDCMPLT:
|
||||
cmd = DEPEVT_PARAMETER_CMD(event->parameters);
|
||||
|
||||
if (cmd == DWC3_DEPCMD_ENDTRANSFER)
|
||||
dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue