[PATCH RFC net 5/6] net: macb: kick the transmitter on link-up
From: Steffen Dirkwinkel
Date: Thu Oct 22 2026 - 05:46:04 EST
From: Steffen Dirkwinkel <s.dirkwinkel@xxxxxxxxxxxx>
Write TSTART in macb_mac_link_up() for every queue that still has
frames outstanding once transmit has been re-enabled.
Frames queued before a link-down stay in the ring, and setting NCR.TE
does not start the transmitter; the driver relies on the next
macb_start_xmit() to write TSTART. If BQL stopped the queue before the
link went down, that transmit never comes and the queue stays idle
until the netdev watchdog fires.
Like the rotation, the kick is skipped on the at91rm9200 EMAC, which
uses its own TX path.
Fixes: 881a0263d502 ("net: macb: Shuffle the tx ring before enabling tx")
Cc: stable@xxxxxxxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@xxxxxxxxxxxx>
---
drivers/net/ethernet/cadence/macb_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 6e7ead23d0b7..3dfc7ffdd598 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -903,6 +903,8 @@ static void gem_shuffle_tx_rings(struct macb *bp)
gem_shuffle_tx_one_ring(queue);
}
+static void macb_tx_restart(struct macb_queue *queue);
+
static void macb_mac_link_up(struct phylink_config *config,
struct phy_device *phydev,
unsigned int mode, phy_interface_t interface,
@@ -969,6 +971,10 @@ static void macb_mac_link_up(struct phylink_config *config,
spin_unlock_irqrestore(&bp->lock, flags);
if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC)) {
+ /* With BQL holding a queue stopped no xmit would issue TSTART */
+ for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
+ macb_tx_restart(queue);
+
/* Reap the frames completed while link-down had TCOMP masked */
local_bh_disable();
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
--
2.56.0