net/mlx5e: Ethtool link speed setting fixes
- Port speed settings are applied by the device only upon port admin status transition from DOWN to UP. So we enforce this transition regardless of the port's current operation state (which may be occasionally DOWN if for example the network cable is disconnected). - Fix the PORT_UP/DOWN device interface enum - Set the local_port bit in the device PAOS register - EXPORT the PAOS (Port Administrative and Operational Status) register set/query access functions. Signed-off-by: Achiad Shochat <achiad@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d9a40271cf
commit
6fa1bcab6b
@@ -152,8 +152,8 @@ enum mlx5_dev_event {
|
||||
};
|
||||
|
||||
enum mlx5_port_status {
|
||||
MLX5_PORT_UP = 1 << 1,
|
||||
MLX5_PORT_DOWN = 1 << 2,
|
||||
MLX5_PORT_UP = 1,
|
||||
MLX5_PORT_DOWN = 2,
|
||||
};
|
||||
|
||||
struct mlx5_uuar_info {
|
||||
@@ -761,9 +761,10 @@ int mlx5_query_port_proto_oper(struct mlx5_core_dev *dev,
|
||||
u8 local_port);
|
||||
int mlx5_set_port_proto(struct mlx5_core_dev *dev, u32 proto_admin,
|
||||
int proto_mask);
|
||||
int mlx5_set_port_status(struct mlx5_core_dev *dev,
|
||||
enum mlx5_port_status status);
|
||||
int mlx5_query_port_status(struct mlx5_core_dev *dev, u8 *status);
|
||||
int mlx5_set_port_admin_status(struct mlx5_core_dev *dev,
|
||||
enum mlx5_port_status status);
|
||||
int mlx5_query_port_admin_status(struct mlx5_core_dev *dev,
|
||||
enum mlx5_port_status *status);
|
||||
|
||||
int mlx5_set_port_mtu(struct mlx5_core_dev *dev, int mtu, u8 port);
|
||||
void mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu, u8 port);
|
||||
|
Reference in New Issue
Block a user