• Thinh Nguyen's avatar
    usb: dwc3: gadget: Give back staled requests · a7027ca6
    Thinh Nguyen authored
    If a request is dequeued, the transfer is cancelled. Give back all
    the started requests.
    
    In most scenarios, the function driver dequeues all requests of a
    transfer when there's a failure. If the function driver follows this,
    then it's fine. If not, then we'd be skipping TRBs at different points
    within the dequeue and enqueue pointers, making dequeue/enqueue pointers
    useless. To enforce and make sure that we're properly skipping TRBs,
    cancel all the started requests and give back all the cancelled requests
    to the function drivers.
    Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    a7027ca6
gadget.c 89.2 KB