Skip to content
/ linux Public

Commit 80b3f9b

Browse files
riceraSasha Levin
authored andcommitted
ionic: Rate limit unknown xcvr type messages
[ Upstream commit cdb1634 ] 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: 4d03e00 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d3c75db commit 80b3f9b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,10 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
222222
/* This means there's no module plugged in */
223223
break;
224224
default:
225-
dev_info(lif->ionic->dev, "unknown xcvr type pid=%d / 0x%x\n",
226-
idev->port_info->status.xcvr.pid,
227-
idev->port_info->status.xcvr.pid);
225+
dev_dbg_ratelimited(lif->ionic->dev,
226+
"unknown xcvr type pid=%d / 0x%x\n",
227+
idev->port_info->status.xcvr.pid,
228+
idev->port_info->status.xcvr.pid);
228229
break;
229230
}
230231

0 commit comments

Comments
 (0)