[PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped

From: Nicolai Buchwitz

Date: Wed Nov 18 2026 - 15:41:13 EST


With xmit_more, queued frames reach the hardware only when a later frame
writes TDMA_PROD_INDEX. If that frame is dropped, the write is skipped
and the queued frames wait for the next transmit on that ring, which may
never come.

Write the producer index on the drop paths too.

Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>
---
Another bug flagged by sashiko over the past few months.

Writing the producer index on every exit is the correct way to handle
this, but I could not reproduce a stall. Thus net-next it is.
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 61f5a4c2f0cd..6545caf3232d 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2254,11 +2254,11 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
if (ring->free_bds <= ring->stop_thld)
netif_tx_stop_queue(txq);

+out:
+ /* A dropped frame can end an xmit_more batch */
if (!netdev_xmit_more() || netif_xmit_stopped(txq))
- /* Packets are ready, update producer index */
bcmgenet_tdma_ring_writel(priv, ring->index,
ring->prod_index, TDMA_PROD_INDEX);
-out:
spin_unlock(&ring->lock);

return ret;

---
base-commit: d6816d9a93b66a12bf01e10037e377f3333ad6cc
change-id: 20261118-nb-genet-xmit-drop-kick-nn-89a5cfa585fe

Best regards,
--
Nicolai Buchwitz <nb@xxxxxxxxxxx>