usb: dwc_otg_310: reinit isoc ep frame num when dequeue

The frame num of isoc ep is initialized to 0xFFFFFFFF in
ep_enable and start_next_request(), and then in the NAK
interrupt handler, it will check if the ep frame num is
0xFFFFFFFF, then reset the frame num to 0 and start next
request.

But if we dequeue the isoc ep request if it's already
enqueued, if may fail to call complete_ep() -> start_
next_request(), so the isoc ep frame num can't be reinit
to 0xFFFFFFFF, this cause NAK interrupt handler check
the frame num incorrectly, and fail to start next request.

Change-Id: Iab8526f6e3979347bdbe6c49525ec0ba8130d4bc
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu
2017-11-28 10:57:35 +08:00
committed by Tao Huang
parent 160f9f6f0a
commit 94ddeb4fa9

View File

@@ -2496,6 +2496,9 @@ int dwc_otg_pcd_ep_dequeue(dwc_otg_pcd_t *pcd, void *ep_handle,
}
dwc_otg_request_done(ep, req, -DWC_E_RESTART);
if (ep->dwc_ep.type == DWC_OTG_EP_TYPE_ISOC)
ep->dwc_ep.frame_num = 0xFFFFFFFF;
} else {
req = NULL;
}