aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoron Tsur <doront@mellanox.com>2015-11-12 12:35:27 -0500
committerDavid S. Miller <davem@davemloft.net>2015-11-15 18:43:40 -0500
commit50a9eea694ab8e0779069e0a4e0b12e145521468 (patch)
treedd6235f80557fefdd0a79051413f04afdca622d6
parent66189961e986e53ae39822898fc2ce88f44c61bb (diff)
net/mlx5e: Max mtu comparison fix
On change mtu the driver compares between hardware queried mtu and software requested mtu. We need to compare between software representation of the queried mtu and the requested mtu. Fixes: facc9699f0fe ('net/mlx5e: Fix HW MTU settings') Signed-off-by: Doron Tsur <doront@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index df001754bcd1..1e52db32c73d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1901,6 +1901,8 @@ static int mlx5e_change_mtu(struct net_device *netdev, int new_mtu)
1901 1901
1902 mlx5_query_port_max_mtu(mdev, &max_mtu, 1); 1902 mlx5_query_port_max_mtu(mdev, &max_mtu, 1);
1903 1903
1904 max_mtu = MLX5E_HW2SW_MTU(max_mtu);
1905
1904 if (new_mtu > max_mtu) { 1906 if (new_mtu > max_mtu) {
1905 netdev_err(netdev, 1907 netdev_err(netdev,
1906 "%s: Bad MTU (%d) > (%d) Max\n", 1908 "%s: Bad MTU (%d) > (%d) Max\n",