]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: gadget: Fix ISOC flow for elapsed frames
authorMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Thu, 4 Nov 2021 07:36:01 +0000 (11:36 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:39 +0000 (09:04 +0100)
commit83a96c60ac9d90de27c5299983266984d8f1e8a4
tree990bc80cfd423b1ab0c329b739117e6d7235a3f9
parentee85d64bdb19346d8558bc4cb4d58c688c21edb9
usb: dwc2: gadget: Fix ISOC flow for elapsed frames

commit b19de851432082f4a6ea5ca461492056724eb5bd upstream.

Added updating of request frame number for elapsed frames,
otherwise frame number will remain as previous use of request.
This will allow function driver to correctly track frames in
case of Missed ISOC occurs.

Added setting request actual length to 0 for elapsed frames.
In Slave mode when pushing data to RxFIFO by dwords, request
actual length incrementing accordingly. But before whole packet
will be pushed into RxFIFO and send to host can occurs Missed
ISOC and data will not send to host. So, in this case request
actual length should be reset to 0.

Fixes: 7ed2dd749f16 ("usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: John Keeping <john@metanate.com>
Signed-off-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Link: https://lore.kernel.org/r/c356baade6e9716d312d43df08d53ae557cb8037.1636011277.git.Minas.Harutyunyan@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/gadget.c