Netdev List
 help / color / mirror / Atom feed
From: Tariq Toukan <tariqt@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Eran Ben Elisha <eranbe@mellanox.com>,
	Yishai Hadas <yishaih@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>
Subject: [PATCH net-next V2 2/8] net/mlx4_core: Device revision support
Date: Sun, 29 Jan 2017 13:22:24 +0200	[thread overview]
Message-ID: <1485688950-32443-3-git-send-email-tariqt@mellanox.com> (raw)
In-Reply-To: <1485688950-32443-1-git-send-email-tariqt@mellanox.com>

From: Yishai Hadas <yishaih@mellanox.com>

The device revision field returned by the NodeInfo MAD is incorrect
on ConnectX3 devices.

This patch is driver side handling to complete a FW fix added at 2.11.1172.
INIT_HCA - bit at offset 0x0C.12 is set to 1 so that FW will report
correct device revision.

Older FW versions won't be affected from turning on that bit,
no capability bit is needed.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 25b5b32e958f..de39a5db4a6f 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -1875,7 +1875,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
 	*((u8 *) mailbox->buf + INIT_HCA_VERSION_OFFSET) = INIT_HCA_VERSION;
 
 	*((u8 *) mailbox->buf + INIT_HCA_CACHELINE_SZ_OFFSET) =
-		(ilog2(cache_line_size()) - 4) << 5;
+		((ilog2(cache_line_size()) - 4) << 5) | (1 << 4);
 
 #if defined(__LITTLE_ENDIAN)
 	*(inbox + INIT_HCA_FLAGS_OFFSET / 4) &= ~cpu_to_be32(1 << 1);
-- 
1.8.3.1

  parent reply	other threads:[~2017-01-29 11:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-29 11:22 [PATCH net-next V2 0/8] mlx4 misc improvements Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 1/8] net/mlx4: Replace ENOSYS with better fitting error codes Tariq Toukan
2017-01-29 11:22 ` Tariq Toukan [this message]
2017-01-29 11:22 ` [PATCH net-next V2 3/8] net/mlx4_core: Add resource alloc/dealloc debugging Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 4/8] net/mlx4_core: Get num_tc using netdev_get_num_tc Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 5/8] net/mlx4_en: Adding support of turning off link autonegotiation via ethtool Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 6/8] net/mlx4_en: Pass user MTU value to Firmware at set port command Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 7/8] net/mlx4_en: Check the enabling mtu flag in SET_PORT wrapper flow Tariq Toukan
2017-01-29 11:22 ` [PATCH net-next V2 8/8] net/mlx4_en: Check the enabling pptx/pprx flags " Tariq Toukan
2017-01-29 13:45 ` [PATCH net-next V2 0/8] mlx4 misc improvements Tariq Toukan

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=1485688950-32443-3-git-send-email-tariqt@mellanox.com \
    --to=tariqt@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=yishaih@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