]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ionic: Rate limit unknown xcvr type messages
authorEric Joyner <eric.joyner@amd.com>
Fri, 6 Feb 2026 22:46:51 +0000 (14:46 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Feb 2026 04:59:35 +0000 (20:59 -0800)
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>
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c

index 2d9efadb5d2ae1b19ce3c485a53775eb553e0c02..347b0aff100b9f952ce940b4efbeae0adfa8988b 100644 (file)
@@ -263,9 +263,10 @@ 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",
-                        idev->port_info->status.xcvr.pid,
-                        idev->port_info->status.xcvr.pid);
+               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;
        }