usb: dwc2: gadget: ISOC's starting flow improvement
Quoted 11 lines · Minas Harutyunyan
To start ISOC transfers in handlers
dwc2_gadget_handle_nak()anddwc2_gadget_handle_out_token_ep_disabled()driver reads current frame number, based on which, set target frame number to start first ISOC transfer.In case if system's high IRQ latency and multiple EP's asserted interrupt in same frame, there are high probability that when reading current frame number in EP's handlers, actual frame number can be increased. As result for bInterval > 1, starting target frame will be set wrongly and all ISOC packets will be dropped.
Quoted 6 lines
In patch "usb: dwc2: Change reading of current frame number flow" reading of current frame number done ASAP in common interrupt handler. This frame number stored in
frame_numbervariable which used as starting frame number for ISOC EP's in above mentioned handlers.Signed-off-by Minas Harutyunyan <[email protected]>
please rebase on top of testing/next after a couple hours:
checking file drivers/usb/dwc2/gadget.c
Hunk #1 FAILED at 2749.
Hunk #2 succeeded at 2772 (offset -1 lines).
Hunk #3 FAILED at 2811.
2 out of 3 hunks FAILED