]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
usb: dwc3: gadget: Handle XferComplete for streams
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 6 May 2020 02:46:51 +0000 (19:46 -0700)
committerFelipe Balbi <balbi@kernel.org>
Mon, 25 May 2020 08:09:41 +0000 (11:09 +0300)
commit3eaecd0c2333aa9eeefce2ff130c9323cde53178
tree3d3d74762bf757b5258b9160d53e241d588b9afd
parent548f8b31656363c21867a0a0769932b6b3f0f8b6
usb: dwc3: gadget: Handle XferComplete for streams

In DWC3, to prepare TRBs for streams, all the TRBs of a transfer will
use the same stream ID. To start a new stream, the driver needs to wait
for the current transfer to complete or ended (by END_TRANFER command).
As a result, inform the controller of the last TRB of a transfer so that
it knows when a transfer completes and start a new transfer of a new
stream.

Even though the transfer completion handling can be applied for other
non-isoc endpoints, only do it for streams due to its requirement.
It's better to keep the controller's TRB cache full than waiting for
transfer completion and starting a new transfer.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/dwc3/gadget.c