From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Sat, 6 Feb 2021 09:58:25 +0100 Subject: [RESEND PATCH 05/16] usb: musb: Fix configuring FIFO for endpoints In-Reply-To: <20210205191212.7644-6-pali@kernel.org> References: <20210205191212.7644-1-pali@kernel.org> <20210205191212.7644-6-pali@kernel.org> Message-ID: <20210206085825.GB15736@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 1-5: Acked-by: Pavel Machek -- 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: