drivers/net/ethernet/cadence/macb_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
netdev_warn_ratelimited() does not exist in this kernel -- neither
mainline net-next nor raspberrypi/linux rpi-6.18.y define a
netdev_*_ratelimited() family. I confused it with the existing
net_warn_ratelimited() / pr_warn_ratelimited() macros when
authoring v2 patch 3 of the macb silent TX stall series, and the
result fails to build with implicit-function-declaration.
Replace with the standard `if (printk_ratelimit()) netdev_warn(...)`
pattern. Same semantics intended by v2 patch 3 (bounded log noise,
retains the netdev prefix in the message); works in every kernel
version.
Fixes the build of patch 3/3 of:
https://lore.kernel.org/netdev/20260514215459.36109-1-lukasz@raczylo.com/T/
Caught by an independent build test on the Talos Linux Pi 5 build
(John Laur / johnlaur on GitHub), reported at:
https://github.com/siderolabs/sbc-raspberrypi/issues/91#issuecomment-4456874307
Signed-off-by: Lukasz Raczylo <lukasz@raczylo.com>
---
drivers/net/ethernet/cadence/macb_main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -2057,10 +2057,11 @@ static void macb_tx_stall_watchdog(struct work_struct *work)
spin_unlock_irqrestore(&queue->tx_ptr_lock, flags);
if (stalled) {
- netdev_warn_ratelimited(bp->dev,
- "TX stall detected on queue %u (tail=%u head=%u); re-kicking TSTART\n",
- (unsigned int)(queue - bp->queues),
- cur_tail, cur_head);
+ if (printk_ratelimit())
+ netdev_warn(bp->dev,
+ "TX stall detected on queue %u (tail=%u head=%u); re-kicking TSTART\n",
+ (unsigned int)(queue - bp->queues),
+ cur_tail, cur_head);
macb_tx_restart(queue);
}
--
2.54.0
On Fri, May 15, 2026 at 10:53:36AM +0100, Lukasz Raczylo wrote:
> netdev_warn_ratelimited() does not exist in this kernel -- neither
> mainline net-next nor raspberrypi/linux rpi-6.18.y define a
> netdev_*_ratelimited() family. I confused it with the existing
> net_warn_ratelimited() / pr_warn_ratelimited() macros when
> authoring v2 patch 3 of the macb silent TX stall series, and the
> result fails to build with implicit-function-declaration.
>
> Replace with the standard `if (printk_ratelimit()) netdev_warn(...)`
> pattern. Same semantics intended by v2 patch 3 (bounded log noise,
> retains the netdev prefix in the message); works in every kernel
> version.
>
> Fixes the build of patch 3/3 of:
What you should do is reply to patch 3/3 and say
self NACK
and explain why it is broken.
Then wait 24 hours, and send a new version of the patch series, with
patch 3/3 fixed.
Andrew
---
pw-bot: cr
© 2016 - 2026 Red Hat, Inc.