MLK-21243 usb: dwc3: gadget: check if dep->frame_number is still valid

This is a porting patch from upstream commit d53701067f04
("usb: dwc3: gadget: check if dep->frame_number is still valid")

Gadget driver may take an unbounded amount of time to queue requests
after XferNotReady. This is important for isochronous endpoints which
need to be started for a specific (micro-)frame.

If we fail to start a transfer for isochronous endpoint, let's try
queueing to a future interval and see if that helps. We will stop trying
if we fail a start transfer for 5 intervals in the future.

Change-Id: Ib566d08c8095b7f473c474e84bb83fd957e984f2
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Leonid Lobachev <leonidl@google.com>
2 files changed