Skip to content

Commit 281cb9d

Browse files
leitaokuba-moo
authored andcommitted
bnxt_en: Make PTP timestamp HWRM more silent
commit 056bce6 ("bnxt_en: Make PTP TX timestamp HWRM query silent") changed a netdev_err() to netdev_WARN_ONCE(). netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for the following reasons: * You do not a kernel warning if the firmware queries are late * In busy networks, timestamp query failures fairly regularly * A WARNING message doesn't bring much value, since the code path is clear. (This was discussed in-depth in [1]) Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a more well-behaved message, instead of a full WARN(). bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5 [1] Link: https://lore.kernel.org/all/ZbDj%[email protected]/ Signed-off-by: Breno Leitao <[email protected]> Reviewed-by: Pavan Chebbi <[email protected]> Reviewed-by: Michael Chan <[email protected]> Fixes: 056bce6 ("bnxt_en: Make PTP TX timestamp HWRM query silent") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c3dfcdb commit 281cb9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ static void bnxt_stamp_tx_skb(struct bnxt *bp, struct sk_buff *skb)
684684
timestamp.hwtstamp = ns_to_ktime(ns);
685685
skb_tstamp_tx(ptp->tx_skb, &timestamp);
686686
} else {
687-
netdev_WARN_ONCE(bp->dev,
687+
netdev_warn_once(bp->dev,
688688
"TS query for TX timer failed rc = %x\n", rc);
689689
}
690690

0 commit comments

Comments
 (0)