Skip to content

Commit cda669d

Browse files
ShayAgrosgregkh
authored andcommitted
net/mlx5: Fix wrong size allocation for QoS ETC TC regitster
[ 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]>
1 parent 589afe3 commit cda669d

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ EXPORT_SYMBOL_GPL(mlx5_query_port_prio_tc);
701701
static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in,
702702
int inlen)
703703
{
704-
u32 out[MLX5_ST_SZ_DW(qtct_reg)];
704+
u32 out[MLX5_ST_SZ_DW(qetc_reg)];
705705

706706
if (!MLX5_CAP_GEN(mdev, ets))
707707
return -EOPNOTSUPP;
@@ -713,7 +713,7 @@ static int mlx5_set_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *in,
713713
static int mlx5_query_port_qetcr_reg(struct mlx5_core_dev *mdev, u32 *out,
714714
int outlen)
715715
{
716-
u32 in[MLX5_ST_SZ_DW(qtct_reg)];
716+
u32 in[MLX5_ST_SZ_DW(qetc_reg)];
717717

718718
if (!MLX5_CAP_GEN(mdev, ets))
719719
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)