[4.2.y-ckt stable] Patch "net/mlx5e: Max mtu comparison fix" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue Jan 5 21:15:42 UTC 2016


This is a note to let you know that I have just added a patch titled

    net/mlx5e: Max mtu comparison fix

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt1.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 3a0b9585d035b77d478496dc385d550844aff7af Mon Sep 17 00:00:00 2001
From: Doron Tsur <doront at mellanox.com>
Date: Thu, 12 Nov 2015 19:35:27 +0200
Subject: net/mlx5e: Max mtu comparison fix

commit 50a9eea694ab8e0779069e0a4e0b12e145521468 upstream.

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 at mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm at mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz at mellanox.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 40206da..ee70e6c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1625,6 +1625,8 @@ static int mlx5e_change_mtu(struct net_device *netdev, int new_mtu)

 	mlx5_query_port_max_mtu(mdev, &max_mtu, 1);

+	max_mtu = MLX5E_HW2SW_MTU(max_mtu);
+
 	if (new_mtu > max_mtu) {
 		netdev_err(netdev,
 			   "%s: Bad MTU (%d) > (%d) Max\n",
--
1.9.1





More information about the kernel-team mailing list