Commit cdb1634d authored by Eric Joyner's avatar Eric Joyner Committed by Jakub Kicinski
Browse files

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: 4d03e00a ("ionic: Add initial ethtool support")
Signed-off-by: default avatarEric Joyner <eric.joyner@amd.com>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20260206224651.1491-1-eric.joyner@amd.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3def995c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -263,7 +263,8 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
		/* This means there's no module plugged in */
		break;
	default:
		dev_info(lif->ionic->dev, "unknown xcvr type pid=%d / 0x%x\n",
		dev_dbg_ratelimited(lif->ionic->dev,
				    "unknown xcvr type pid=%d / 0x%x\n",
				    idev->port_info->status.xcvr.pid,
				    idev->port_info->status.xcvr.pid);
		break;