Commit 64e28334 authored by Shay Agroskin's avatar Shay Agroskin Committed by Saeed Mahameed

net/mlx5e: Removed unnecessary warnings in FEC caps query

Querying interface FEC caps with 'ethtool [int]' after link reset
throws warning regading link speed.
This warning is not needed as there is already an indication in
user space that the link is not up.

Fixes: 0696d608 ("net/mlx5e: Receive buffer configuration")
Signed-off-by: default avatarShay Agroskin <shayag@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent febd72f2
...@@ -88,10 +88,8 @@ int mlx5e_port_linkspeed(struct mlx5_core_dev *mdev, u32 *speed) ...@@ -88,10 +88,8 @@ int mlx5e_port_linkspeed(struct mlx5_core_dev *mdev, u32 *speed)
eth_proto_oper = MLX5_GET(ptys_reg, out, eth_proto_oper); eth_proto_oper = MLX5_GET(ptys_reg, out, eth_proto_oper);
*speed = mlx5e_port_ptys2speed(eth_proto_oper); *speed = mlx5e_port_ptys2speed(eth_proto_oper);
if (!(*speed)) { if (!(*speed))
mlx5_core_warn(mdev, "cannot get port speed\n");
err = -EINVAL; err = -EINVAL;
}
return err; return err;
} }
......
...@@ -130,8 +130,10 @@ static u32 calculate_xoff(struct mlx5e_priv *priv, unsigned int mtu) ...@@ -130,8 +130,10 @@ static u32 calculate_xoff(struct mlx5e_priv *priv, unsigned int mtu)
int err; int err;
err = mlx5e_port_linkspeed(priv->mdev, &speed); err = mlx5e_port_linkspeed(priv->mdev, &speed);
if (err) if (err) {
mlx5_core_warn(priv->mdev, "cannot get port speed\n");
return 0; return 0;
}
xoff = (301 + 216 * priv->dcbx.cable_len / 100) * speed / 1000 + 272 * mtu / 100; xoff = (301 + 216 * priv->dcbx.cable_len / 100) * speed / 1000 + 272 * mtu / 100;
......
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