[RESEND PATCH 05/16] usb: musb: Fix configuring FIFO for endpoints
Pavel Machek
pavel at ucw.cz
Sat Feb 6 09:58:25 CET 2021
On Fri 2021-02-05 20:12:01, Pali Rohár wrote:
> This patch fixes configuring FIFO for one-directional endpoints which have
> either RX or TX queue and therefore only one FIFO.
>
> Size of FIFO buffer is 2^(idx+3) bytes and starting address is 2^(addr+3).
> Moreover first 64 bytes are reserved for EP0.
>
> Without this patch if FIFO size specified by caller was zero then idx was
> incorrectly calculated (expr. ffs(0)-1) and size overflowed in fifosz
> register. This register uses has only 4 bits for FIFO size. Moreover
> specifying zero size is not possible.
>
> This patch is fixing calculation of start address and buffer size to
> minimal value and ensure that it would not overlap with reserved EP0
> buffer.
>
> This issue caused loose of packets on USB bus in both directions and
> basically usbtty was unusable.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
1-5: Acked-by: Pavel Machek <pavel at ucw.cz>
--
http://www.livejournal.com/~pavelmachek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/91674213/attachment.sig>
More information about the U-Boot
mailing list