Skip to content

Commit 2ff4d9f

Browse files
committed
fixup! net: macb: gate TX stall watchdog on netif_carrier_ok, use warn_ratelimited
netdev_warn_ratelimited() does not exist in this kernel; build fails with implicit-function-declaration. Replace with the standard `if (printk_ratelimit()) netdev_warn(...)` form, which has the same semantics (bounded log noise, retains netdev prefix in the message) and works in every kernel version. Reported-by: John Laur <johnlaur@github> Signed-off-by: Lukasz Raczylo <lukasz@raczylo.com>
1 parent 5a97d38 commit 2ff4d9f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,10 +2094,11 @@ static void macb_tx_stall_watchdog(struct work_struct *work)
20942094
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
20952095

20962096
if (stalled) {
2097-
netdev_warn_ratelimited(bp->dev,
2098-
"TX stall detected on queue %u (tail=%u head=%u); re-kicking TSTART\n",
2099-
(unsigned int)(queue - bp->queues),
2100-
cur_tail, cur_head);
2097+
if (printk_ratelimit())
2098+
netdev_warn(bp->dev,
2099+
"TX stall detected on queue %u (tail=%u head=%u); re-kicking TSTART\n",
2100+
(unsigned int)(queue - bp->queues),
2101+
cur_tail, cur_head);
21012102
macb_tx_restart(queue);
21022103
}
21032104

0 commit comments

Comments
 (0)