Skip to content

Commit

Permalink
mlxsw: spectrum: Report port type according to operational speed
Browse files Browse the repository at this point in the history
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: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ido Schimmel authored and David S. Miller committed Sep 13, 2016
1 parent 4149b97 commit 0213424
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/mellanox/mlxsw/spectrum.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
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);

if (autoneg_status == MLXSW_REG_PTYS_AN_STATUS_OK && eth_proto_lp)
Expand Down

0 comments on commit 0213424

Please sign in to comment.