Commit 0213424a authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller

mlxsw: spectrum: Report port type according to operational speed

In case port isn't operational we shouldn't report the port type, but
instead return PORT_OTHER. This is consistent with most other drivers
that return PORT_OTHER when media type can't be determined.
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4149b97f
...@@ -1828,7 +1828,6 @@ static int mlxsw_sp_port_get_settings(struct net_device *dev, ...@@ -1828,7 +1828,6 @@ static int mlxsw_sp_port_get_settings(struct net_device *dev,
mlxsw_sp_from_ptys_speed_duplex(netif_carrier_ok(dev), mlxsw_sp_from_ptys_speed_duplex(netif_carrier_ok(dev),
eth_proto_oper, cmd); eth_proto_oper, cmd);
eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap;
cmd->port = mlxsw_sp_port_connector_port(eth_proto_oper); cmd->port = mlxsw_sp_port_connector_port(eth_proto_oper);
if (autoneg_status == MLXSW_REG_PTYS_AN_STATUS_OK && eth_proto_lp) if (autoneg_status == MLXSW_REG_PTYS_AN_STATUS_OK && eth_proto_lp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment