• Thinh Nguyen's avatar
    usb: dwc3: gadget: Handle XferComplete for streams · 3eaecd0c
    Thinh Nguyen authored
    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: default avatarThinh Nguyen <thinhn@synopsys.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    3eaecd0c
gadget.c 91.7 KB