Skip to content

Commit

Permalink
usb: dwc3: ep0: ignore XferNotReady(STATUS) when we're not expecting it
Browse files Browse the repository at this point in the history
Databook doesn't say we should stall if we
get XferNotReady(STATUS) while we're expecting
something else.

Instead of stalling and restarting, tests have
proven that ignoring the event is far more
effective.

This problem has been caught while rewriting
ep0 handling in order we pass Link Layer TD7.6.

Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Aug 3, 2012
1 parent 4635d3f commit 77fa6df
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,19 +953,13 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
break;

case DEPEVT_STATUS_CONTROL_STATUS:
if (dwc->ep0_next_event != DWC3_EP0_NRDY_STATUS)
return;

dev_vdbg(dwc->dev, "Control Status\n");

dwc->ep0state = EP0_STATUS_PHASE;

if (dwc->ep0_next_event != DWC3_EP0_NRDY_STATUS) {
dev_vdbg(dwc->dev, "Expected %d got %d\n",
dwc->ep0_next_event,
DWC3_EP0_NRDY_STATUS);

dwc3_ep0_stall_and_restart(dwc);
return;
}

if (dwc->delayed_status) {
WARN_ON_ONCE(event->endpoint_number != 1);
dev_vdbg(dwc->dev, "Mass Storage delayed status\n");
Expand Down

0 comments on commit 77fa6df

Please sign in to comment.