Skip to content

Commit

Permalink
net/mlx5: Fix wrong size allocation for QoS ETC TC regitster
Browse files Browse the repository at this point in the history
[ Upstream commit d14fcb8 ]

The driver allocates wrong size (due to wrong struct name) when issuing
a query/set request to NIC's register.

Fixes: d888079 ("net/mlx5e: Implement DCBNL IEEE max rate")
Signed-off-by: Shay Agroskin <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ShayAgros authored and gregkh committed Jul 22, 2018
1 parent 589afe3 commit cda669d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ EXPORT_SYMBOL_GPL(mlx5_query_port_prio_tc);
static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in,
int inlen)
{
u32 out[MLX5_ST_SZ_DW(qtct_reg)];
u32 out[MLX5_ST_SZ_DW(qetc_reg)];

if (!MLX5_CAP_GEN(mdev, ets))
return -EOPNOTSUPP;
Expand All @@ -713,7 +713,7 @@ static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in,
static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out,
int outlen)
{
u32 in[MLX5_ST_SZ_DW(qtct_reg)];
u32 in[MLX5_ST_SZ_DW(qetc_reg)];

if (!MLX5_CAP_GEN(mdev, ets))
return -EOPNOTSUPP;
Expand Down

0 comments on commit cda669d

Please sign in to comment.