Author: hselasky
Date: Wed Dec 12 12:28:16 2018
New Revision: 341943
URL: https://svnweb.freebsd.org/changeset/base/341943

Log:
  MFC r341565:
  mlx5: Fix wrong size allocation for QoS ETC TC register
  
  The driver allocates wrong size (due to wrong struct name) when issuing
  a query/set request to NIC's register.
  
  Linux commit:
  d14fcb8d877caf1b8d6bd65d444bf62b21f2070c
  
  Sponsored by:   Mellanox Technologies

Modified:
  stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c
==============================================================================
--- stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c        Wed Dec 12 12:27:17 
2018        (r341942)
+++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_port.c        Wed Dec 12 12:28:16 
2018        (r341943)
@@ -810,7 +810,7 @@ int mlx5_query_port_cong_params(struct mlx5_core_dev *
 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 -ENOTSUPP;
@@ -831,7 +831,7 @@ EXPORT_SYMBOL_GPL(mlx5_max_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 -ENOTSUPP;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to