Re: [PATCH net 0/2] net: macb: two fixes for macb_tx_error_task()
From: Théo Lebrun
Date: Mon Nov 09 2026 - 04:55:12 EST
Hello Nicolai,
On Sat Nov 7, 2026 at 9:58 PM CET, Nicolai Buchwitz wrote:
> Both pre-existing bugs were flagged during the clashiko review of my
> software FCS patch [1]. These are the promised follow-up patches.
>
> Patch 1 credits the frames dropped on a TX error to BQL. Patch 2 takes
> tx_ptr_lock in the task, as macb_start_xmit() moves the same pointers
> under it.
>
> Tested on a Raspberry Pi CM5 (RP1 GEM). The bugs are hard to reproduce
> and the error path never fired there, but they are worth fixing anyway.
>
> [1] https://lore.kernel.org/netdev/d1f02ab923c0464fa73cafa75a21943d@xxxxxxxxxxx/
>
> Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>
> ---
> Nicolai Buchwitz (2):
> net: macb: credit unsent frames to BQL in macb_tx_error_task()
> net: macb: take tx_ptr_lock in macb_tx_error_task()
>
> drivers/net/ethernet/cadence/macb_main.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
Yes! Same as you: I never trigger this codepath, so I cannot test
easily. But with your two patches, macb_tx_error_task() is a bit less
broken. It should also reduce Sashiko splats on future patches which is
a nice benefit (of course it won't be silent, it still has
macb_hresp_error_task to complain about).
For both patches:
Reviewed-by: Théo Lebrun <theo.lebrun@xxxxxxxxxxx>
Thanks,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com