[PATCH] USB: gadget: atmel: fix transfer of queued requests

Marek Vasut marex at denx.de
Sat Sep 16 13:35:26 CEST 2023


On 9/13/23 17:00, Artur Rojek wrote:
> In the existing implementation, multiple requests queued up on an
> endpoint are subject to getting evicted without transmission.
> 
> For both control and bulk endpoints, their respective logic found in
> usba_control_irq()/usba_ep_irq() guarantees that TX FIFO is empty before
> data is sent out, and that request_complete() gets called once the
> transaction has been finished. At this point however, if any additional
> requests are found on the endpoint queue, they will be processed by
> submit_next_request(), which makes no checks against the above
> conditions, trashing data on a busy FIFO and neglecting completion
> handlers.
> 
> Fix the above issues by removing the calls to submit_next_request(),
> and thus forcing the pending requests to be processed on the next pass
> of the respective endpoint logic. While at it, remove a DBG message, as
> that branch becomes part of regular flow.
> 
> This restores mass storage mode operation on Microchip ATSAMA5D27 SoC.

Updated subject prefix to lowercase usb: and applied to usb/next, thanks.


More information about the U-Boot mailing list