Skip to content

Commit

Permalink
usb: dwc3: gadget: Don't clear flags before transfer ended
Browse files Browse the repository at this point in the history
We track END_TRANSFER command completion. Don't clear transfer
started/ended flag prematurely. Otherwise, we'd run into the problem
with restarting transfer before END_TRANSFER command finishes.

Fixes: 6d8a019 ("usb: dwc3: gadget: check for Missed Isoc from event status")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
  • Loading branch information
Thinh Nguyen authored and Felipe Balbi committed Mar 15, 2020
1 parent a33e5d6 commit a114c4c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,10 +2570,8 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,

dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);

if (stop) {
if (stop)
dwc3_stop_active_transfer(dep, true, true);
dep->flags = DWC3_EP_ENABLED;
}

/*
* WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround.
Expand Down

0 comments on commit a114c4c

Please sign in to comment.