Netdev List
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Or Gerlitz <ogerlitz@mellanox.com>,
	Shay Agroskin <shayag@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 7/9] net/mlx5: Fix wrong size allocation for QoS ETC TC regitster
Date: Tue, 26 Jun 2018 17:21:16 -0700	[thread overview]
Message-ID: <20180627002118.9856-8-saeedm@mellanox.com> (raw)
In-Reply-To: <20180627002118.9856-1-saeedm@mellanox.com>

From: Shay Agroskin <shayag@mellanox.com>

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

Fixes: d8880795dabf ("net/mlx5e: Implement DCBNL IEEE max rate")
Signed-off-by: Shay Agroskin <shayag@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c
index fa9d0760dd36..31a9cbd85689 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -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;
@@ -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;
-- 
2.17.0

  parent reply	other threads:[~2018-06-27  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27  0:21 [pull request][net 0/9] Mellanox, mlx5 fixes 2018-06-26 Saeed Mahameed
2018-06-27  0:21 ` [net 1/9] net/mlx5e: Don't attempt to dereference the ppriv struct if not being eswitch manager Saeed Mahameed
2018-06-27  0:21 ` [net 2/9] net/mlx5: E-Switch, Avoid setup attempt if not being e-switch manager Saeed Mahameed
2018-06-27  0:21 ` [net 3/9] net/mlx5e: Avoid dealing with vport representors " Saeed Mahameed
2018-06-27  0:21 ` [net 4/9] IB/mlx5: " Saeed Mahameed
2018-06-27  0:21 ` [net 5/9] net/mlx5: E-Switch, Disallow vlan/spoofcheck setup if not being esw manager Saeed Mahameed
2018-06-27  0:21 ` [net 6/9] net/mlx5: Fix required capability for manipulating MPFS Saeed Mahameed
2018-06-27  0:21 ` Saeed Mahameed [this message]
2018-06-27  0:21 ` [net 8/9] net/mlx5: Fix incorrect raw command length parsing Saeed Mahameed
2018-06-27  0:21 ` [net 9/9] net/mlx5: Fix command interface race in polling mode Saeed Mahameed
2018-06-28  7:57 ` [pull request][net 0/9] Mellanox, mlx5 fixes 2018-06-26 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180627002118.9856-8-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=shayag@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox