]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5e: Don't gate FEC histograms on ppcnt_statistical_group
authorAlexei Lazar <alazar@nvidia.com>
Thu, 25 Dec 2025 13:27:14 +0000 (15:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:35:23 +0000 (16:35 +0100)
commitcba6cc0f46540350d250e8355c84e339d99310b5
tree985afd836a84ae0e8d5e8a1833b8036d94c27c18
parent6584963258249da7fc6aee5ed27e90cf0d4065a8
net/mlx5e: Don't gate FEC histograms on ppcnt_statistical_group

[ Upstream commit 6c75dc9de40ff91ec2b621b78f6cd9031762067c ]

Currently, the ppcnt_statistical_group capability check
incorrectly gates access to FEC histogram statistics.
This capability applies only to statistical and physical
counter groups, not for histogram data.

Restrict the ppcnt_statistical_group check to the
Physical_Layer_Counters and Physical_Layer_Statistical_Counters
groups.
Histogram statistics access remains gated by the pphcr
capability.

The issue is harmless as of today, as it happens that
ppcnt_statistical_group is set on all existing devices that
have pphcr set.

Fixes: 6b81b8a0b197 ("net/mlx5e: Don't query FEC statistics when FEC is disabled")
Signed-off-by: Alexei Lazar <alazar@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20251225132717.358820-3-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c