[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241106151714.GR4507@kernel.org>
Date: Wed, 6 Nov 2024 15:17:14 +0000
From: Simon Horman <horms@...nel.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Thomas Kopp <thomas.kopp@...rochip.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>,
Sven Schuchmann <schuchmann@...leissheimer.de>,
linux-can@...r.kernel.org, kernel@...gutronix.de,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH can v3] can: mcp251xfd: mcp251xfd_get_tef_len(): fix
length calculation
On Mon, Nov 04, 2024 at 05:42:40PM +0100, Marc Kleine-Budde wrote:
> Commit b8e0ddd36ce9 ("can: mcp251xfd: tef: prepare to workaround
> broken TEF FIFO tail index erratum") introduced
> mcp251xfd_get_tef_len() to get the number of unhandled transmit events
> from the Transmit Event FIFO (TEF).
>
> As the TEF has no head pointer, the driver uses the TX FIFO's tail
> pointer instead, assuming that send frames are completed. However the
> check for the TEF being full was not correct. This leads to the driver
> stop working if the TEF is full.
>
> Fix the TEF full check by assuming that if, from the driver's point of
> view, there are no free TX buffers in the chip and the TX FIFO is
> empty, all messages must have been sent and the TEF must therefore be
> full.
>
> Reported-by: Sven Schuchmann <schuchmann@...leissheimer.de>
> Closes: https://patch.msgid.link/FR3P281MB155216711EFF900AD9791B7ED9692@FR3P281MB1552.DEUP281.PROD.OUTLOOK.COM
> Fixes: b8e0ddd36ce9 ("can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum")
> Tested-by: Sven Schuchmann <schuchmann@...leissheimer.de>
> Cc: stable@...r.kernel.org
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
Reviewed-by: Simon Horman <horms@...nel.org>
...
Powered by blists - more mailing lists