Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ionic: Rate limit unknown xcvr type messages

Running ethtool repeatedly with a transceiver unknown to the driver or
firmware will cause the driver to spam the kernel logs with "unknown
xcvr type" messages which can distract from real issues; and this isn't
interesting information outside of debugging. Fix this by rate limiting
the output so that there are still notifications but not so many that
they flood the log.

Using dev_dbg_once() would reduce the number of messages further, but
this would miss the case where a different unknown transceiver type is
plugged in, and its status is requested.

Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support")
Signed-off-by: Eric Joyner <eric.joyner@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20260206224651.1491-1-eric.joyner@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Joyner and committed by
Jakub Kicinski
cdb1634d 3def995c

+4 -3
+4 -3
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
··· 263 263 /* This means there's no module plugged in */ 264 264 break; 265 265 default: 266 - dev_info(lif->ionic->dev, "unknown xcvr type pid=%d / 0x%x\n", 267 - idev->port_info->status.xcvr.pid, 268 - idev->port_info->status.xcvr.pid); 266 + dev_dbg_ratelimited(lif->ionic->dev, 267 + "unknown xcvr type pid=%d / 0x%x\n", 268 + idev->port_info->status.xcvr.pid, 269 + idev->port_info->status.xcvr.pid); 269 270 break; 270 271 } 271 272