Skip to content

Commit ae9b24d

Browse files
daniellertskuba-moo
authored andcommitted
mlxsw: spectrum_ethtool: Add an external speed to PTYS register
Currently, only external bits are added to the PTYS register, whereas there is one external bit that is wrongly marked as internal, and so was recently removed from the register. Add that bit to the PTYS register again, as this bit is no longer internal. Its removal resulted in '100000baseLR4_ER4/Full' link mode no longer being supported, causing a regression on some setups. Fixes: 5bf01b5 ("mlxsw: spectrum_ethtool: Remove internal speeds from PTYS register") Signed-off-by: Danielle Ratson <[email protected]> Reported-by: Eddie Shklaer <[email protected]> Tested-by: Eddie Shklaer <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent edcbf51 commit ae9b24d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4430,6 +4430,7 @@ MLXSW_ITEM32(reg, ptys, ext_eth_proto_cap, 0x08, 0, 32);
44304430
#define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_CR4 BIT(20)
44314431
#define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_SR4 BIT(21)
44324432
#define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4 BIT(22)
4433+
#define MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4 BIT(23)
44334434
#define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_CR BIT(27)
44344435
#define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_KR BIT(28)
44354436
#define MLXSW_REG_PTYS_ETH_SPEED_25GBASE_SR BIT(29)

drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,11 @@ static const struct mlxsw_sp1_port_link_mode mlxsw_sp1_port_link_mode[] = {
11691169
.mask_ethtool = ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT,
11701170
.speed = SPEED_100000,
11711171
},
1172+
{
1173+
.mask = MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4,
1174+
.mask_ethtool = ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT,
1175+
.speed = SPEED_100000,
1176+
},
11721177
};
11731178

11741179
#define MLXSW_SP1_PORT_LINK_MODE_LEN ARRAY_SIZE(mlxsw_sp1_port_link_mode)

drivers/net/ethernet/mellanox/mlxsw/switchx2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ static const struct mlxsw_sx_port_link_mode mlxsw_sx_port_link_mode[] = {
613613
{
614614
.mask = MLXSW_REG_PTYS_ETH_SPEED_100GBASE_CR4 |
615615
MLXSW_REG_PTYS_ETH_SPEED_100GBASE_SR4 |
616-
MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4,
616+
MLXSW_REG_PTYS_ETH_SPEED_100GBASE_KR4 |
617+
MLXSW_REG_PTYS_ETH_SPEED_100GBASE_LR4_ER4,
617618
.speed = 100000,
618619
},
619620
};

0 commit comments

Comments
 (0)