Commit 8bcb83d
Benjamin Poirier
net/mlx5e: Fix number of lanes to UNKNOWN when using data_rate_oper
JIRA: https://issues.redhat.com/browse/RHEL-72227
JIRA: https://issues.redhat.com/browse/RHEL-73520
Upstream-status: v6.16-rc2
commit 875d7c1
Author: Shahar Shitrit <shshitrit@nvidia.com>
Date: Tue Jun 10 18:15:14 2025 +0300
net/mlx5e: Fix number of lanes to UNKNOWN when using data_rate_oper
When the link is up, either eth_proto_oper or ext_eth_proto_oper
typically reports the active link protocol, from which both speed
and number of lanes can be retrieved. However, in certain cases,
such as when a NIC is connected via a non-standard cable, the
firmware may not report the protocol.
In such scenarios, the speed can still be obtained from the
data_rate_oper field in PTYS register. Since data_rate_oper
provides only speed information and lacks lane details, it is
incorrect to derive the number of lanes from it.
This patch corrects the behavior by setting the number of lanes to
UNKNOWN instead of incorrectly using MAX_LANES when relying on
data_rate_oper.
Fixes: 7e95979 ("net/mlx5e: Enable lanes configuration when auto-negotiation is off")
Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Link: https://patch.msgid.link/20250610151514.1094735-10-mbloch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Benjamin Poirier <bpoirier@redhat.com>1 parent 7e42ce5 commit 8bcb83d
1 file changed
+1
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
1098 | 1097 | | |
1099 | 1098 | | |
1100 | 1099 | | |
1101 | | - | |
| 1100 | + | |
1102 | 1101 | | |
1103 | | - | |
1104 | | - | |
1105 | 1102 | | |
1106 | 1103 | | |
1107 | 1104 | | |
| |||
0 commit comments