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 2/9] net/mlx4_core: Device revision support
Date: Mon, 16 Jan 2017 19:29:58 +0200	[thread overview]
Message-ID: <1484587805-12666-3-git-send-email-tariqt@mellanox.com> (raw)
In-Reply-To: <1484587805-12666-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-16 17:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 17:29 [PATCH net-next 0/9] mlx4 misc improvements Tariq Toukan
2017-01-16 17:29 ` [PATCH net-next 1/9] net/mlx4: Replace ENOSYS with better fitting error codes Tariq Toukan
2017-01-16 17:29 ` Tariq Toukan [this message]
2017-01-16 17:29 ` [PATCH net-next 3/9] net/mlx4_core: Set EQ affinity hint to local NUMA CPUs Tariq Toukan
2017-01-16 21:44   ` Or Gerlitz
2017-01-16 21:54     ` Daniel Jurgens
2017-01-16 21:57       ` David Miller
2017-01-16 21:59       ` Or Gerlitz
2017-01-16 22:21         ` Daniel Jurgens
2017-01-16 17:30 ` [PATCH net-next 4/9] net/mlx4_core: Add resource alloc/dealloc debugging Tariq Toukan
2017-01-16 17:30 ` [PATCH net-next 5/9] net/mlx4_core: Get num_tc using netdev_get_num_tc Tariq Toukan
2017-01-16 17:30 ` [PATCH net-next 6/9] net/mlx4_en: Adding support of turning off link autonegotiation via ethtool Tariq Toukan
2017-01-16 21:48   ` Or Gerlitz
2017-01-16 23:08     ` Ariel Levkovich
2017-01-17  7:20       ` Or Gerlitz
2017-01-17  7:21       ` Or Gerlitz
2017-01-16 17:30 ` [PATCH net-next 7/9] net/mlx4_en: Pass user MTU value to Firmware at set port command Tariq Toukan
2017-01-16 17:30 ` [PATCH net-next 8/9] net/mlx4_en: Check the enabling mtu flag in SET_PORT wrapper flow Tariq Toukan
2017-01-16 17:30 ` [PATCH net-next 9/9] net/mlx4_en: Check the enabling pptx/pprx flags " Tariq Toukan
2017-01-17 19:49 ` [PATCH net-next 0/9] mlx4 misc improvements David Miller
2017-01-19  8:32   ` 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=1484587805-12666-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