Patch "net/mlx5e: Device's mtu field is u16 and not int" has been added to the 4.5-stable tree
Subsystems (6)
This is a note to let you know that I've just added the patch titled
net/mlx5e: Device's mtu field is u16 and not int
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-mlx5e-device-s-mtu-field-is-u16-and-not-int.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon May 16 11:20:33 PDT 2016
From: Saeed Mahameed <[email protected]>
Date: Fri, 22 Apr 2016 00:33:03 +0300
Subject: net/mlx5e: Device's mtu field is u16 and not int
From: Saeed Mahameed <[email protected]>
[ Upstream commit 046339eaab26804f52f6604877f5674f70815b26 ]
For set/query MTU port firmware commands the MTU field is 16 bits, here I changed all the "int mtu" parameters of the functions wrapping those firmware commands to be u16.
--- drivers/infiniband/hw/mlx5/main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/port.c | 10 +++++----- include/linux/mlx5/driver.h | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-)
drivers/infiniband/hw/mlx5/main.c +2 -2
@@ -654,8 +654,8 @@ static int mlx5_query_hca_port(struct ibstruct mlx5_ib_dev *dev =to_mdev (ibdev);struct mlx5_core_dev *mdev = dev->mdev;struct mlx5_hca_vport_context *rep; -int max_mtu; -int oper_mtu; +u16 max_mtu; +u16 oper_mtu;int err;u8 ib_link_width_oper;u8 vl_hw_cap;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -2
@@ -1393,7 +1393,7 @@ static int mlx5e_set_dev_port_mtu(struct {struct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev; -int hw_mtu; +u16 hw_mtu;int err; err =mlx5_set_port_mtu (mdev,MLX5E_SW2HW_MTU (netdev->mtu),1 );
@@ -1911,7 +1911,7 @@ static int mlx5e_change_mtu(struct net_dstruct mlx5e_priv *priv =netdev_priv (netdev);struct mlx5_core_dev *mdev = priv->mdev;bool was_opened; -int max_mtu; +u16 max_mtu;int err =0 ;mlx5_query_port_max_mtu (mdev, &max_mtu,1 );
drivers/net/ethernet/mellanox/mlx5/core/port.c +5 -5
@@ -246,8 +246,8 @@ int mlx5_query_port_admin_status(struct }EXPORT_SYMBOL_GPL (mlx5_query_port_admin_status); -static void mlx5_query_port_mtu (struct mlx5_core_dev *dev,int *admin_mtu, -int *max_mtu,int *oper_mtu,u8 port) +static void mlx5_query_port_mtu (struct mlx5_core_dev *dev,u16 *admin_mtu, +u16 *max_mtu,u16 *oper_mtu,u8 port) {u32 in[MLX5_ST_SZ_DW (pmtu_reg)];u32 out[MLX5_ST_SZ_DW (pmtu_reg)];
@@ -267,7 +267,7 @@ static void mlx5_query_port_mtu(struct m *admin_mtu =MLX5_GET (pmtu_reg, out, admin_mtu); } -int mlx5_set_port_mtu (struct mlx5_core_dev *dev,int mtu,u8 port) +int mlx5_set_port_mtu (struct mlx5_core_dev *dev,u16 mtu,u8 port) {u32 in[MLX5_ST_SZ_DW (pmtu_reg)];u32 out[MLX5_ST_SZ_DW (pmtu_reg)];
@@ -282,14 +282,14 @@ int mlx5_set_port_mtu(struct mlx5_core_d }EXPORT_SYMBOL_GPL (mlx5_set_port_mtu); -void mlx5_query_port_max_mtu (struct mlx5_core_dev *dev,int *max_mtu, +void mlx5_query_port_max_mtu (struct mlx5_core_dev *dev,u16 *max_mtu,u8 port) {mlx5_query_port_mtu (dev,NULL , max_mtu,NULL , port); }EXPORT_SYMBOL_GPL (mlx5_query_port_max_mtu); -void mlx5_query_port_oper_mtu (struct mlx5_core_dev *dev,int *oper_mtu, +void mlx5_query_port_oper_mtu (struct mlx5_core_dev *dev,u16 *oper_mtu,u8 port) {mlx5_query_port_mtu (dev,NULL ,NULL , oper_mtu, port);
include/linux/mlx5/driver.h +3 -3
@@ -813,9 +813,9 @@ int mlx5_set_port_admin_status(struct mlint 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); -void mlx5_query_port_oper_mtu (struct mlx5_core_dev *dev,int *oper_mtu, +int mlx5_set_port_mtu (struct mlx5_core_dev *dev,u16 mtu,u8 port); +void mlx5_query_port_max_mtu (struct mlx5_core_dev *dev,u16 *max_mtu,u8 port); +void mlx5_query_port_oper_mtu (struct mlx5_core_dev *dev,u16 *oper_mtu,u8 port); int mlx5_query_port_vl_hw_cap(struct mlx5_core_dev *dev,
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/net-mlx5e-device-s-mtu-field-is-u16-and-not-int.patch queue-4.5/net-mlx5e-use-vport-mtu-rather-than-physical-port-mtu.patch queue-4.5/net-mlx5e-fix-minimum-mtu.patch queue-4.5/net-mlx5_core-fix-soft-lockup-in-steering-error-flow.patch