* [PATCH net-next] net/mlx5e: Remove _once from PCI heuristic debug print
@ 2026-07-23 8:17 Tariq Toukan
0 siblings, 0 replies; only message in thread
From: Tariq Toukan @ 2026-07-23 8:17 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
netdev, Paolo Abeni
Cc: Alex Lazar, Carolina Jubran, Cosmin Ratiu, Daniel Zahka,
Dragos Tatulea, Gal Pressman, Jacob Keller, Leon Romanovsky,
linux-kernel, linux-rdma, Mark Bloch, Nathan Chancellor,
Raed Salem, Rahul Rameshbabu, Saeed Mahameed, Simon Horman,
Tariq Toukan
From: Gal Pressman <gal@nvidia.com>
The _once rate-limiting in slow_pci_heuristic() is unnecessary because
this function only runs during probe.
Worse, it interacts poorly with dynamic debug: if the first probe
happens before dynamic debug is enabled for this callsite, the _once
flag is permanently consumed and the message becomes unreachable without
reloading the module.
Additionally, only the first probed device values were printable in case
of multiple devices.
Replace with mlx5_core_dbg() which allows enabling the print via dynamic
debug at any time and observing it on the next probe.
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Alex Lazar <alazar@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
index 1f4a547917ba..5caf7820a136 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
@@ -545,8 +545,8 @@ bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
mlx5_port_max_linkspeed(mdev, &link_speed);
pci_bw = pcie_bandwidth_available(mdev->pdev, NULL, NULL, NULL);
- mlx5_core_dbg_once(mdev, "Max link speed = %d, PCI BW = %d\n",
- link_speed, pci_bw);
+ mlx5_core_dbg(mdev, "Max link speed = %d, PCI BW = %d\n", link_speed,
+ pci_bw);
#define MLX5E_SLOW_PCI_RATIO (2)
base-commit: 1df10cef2d1e7f9f2fb7eddb67fc70d3abf101f9
--
2.44.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-23 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 8:17 [PATCH net-next] net/mlx5e: Remove _once from PCI heuristic debug print Tariq Toukan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox