Re: [PATCH net 2/2] net: bcmasp: fix tx_spb_ring_full() checking same slot cnt times
From: Florian Fainelli
Date: Thu Sep 03 2026 - 18:40:15 EST
On 8/31/26 11:42, Danesh Petigara wrote:
From: Justin Chen <justin.chen@xxxxxxxxxxxx>
The loop initialised next_index from intf->tx_spb_index on every
iteration, so incr_ring() always produced the same result and only
one slot was ever tested. Move the initialisation before the loop
so each iteration advances next_index and the function correctly
checks that cnt consecutive descriptor slots are available before
allowing a new transmission.
Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")
Signed-off-by: Justin Chen <justin.chen@xxxxxxxxxxxx>
Assisted-by: Claude:claude-sonnet-4-6 vscode
Signed-off-by: Danesh Petigara <danesh.petigara@xxxxxxxxxxxx>
Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian