All of lore.kernel.org
 help / color / mirror / Atom feed
From: Devesh Sharma <devesh.sharma@broadcom.com>
To: dledford@redhat.com, jgg@mellanox.com
Cc: linux-rdma@vger.kernel.org,
	Luke Starrett <luke.starrett@broadcom.com>,
	Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Devesh Sharma <devesh.sharma@broadcom.com>
Subject: [PATCH V3 for-next 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
Date: Thu, 21 Nov 2019 01:22:21 -0500	[thread overview]
Message-ID: <1574317343-23300-2-git-send-email-devesh.sharma@broadcom.com> (raw)
In-Reply-To: <1574317343-23300-1-git-send-email-devesh.sharma@broadcom.com>

From: Luke Starrett <luke.starrett@broadcom.com>

In the first version of Gen P5 ASIC, chip-id was always
set to 0x1750 for all adaptor port configurations. This
has been fixed in the new chip rev.

Due to this missing fix the end customer are not able to
use adaptors based on latest chip rev of Broadcom's Gen
P5 adaptors.

Making a change in chip-number validation check to honor
other chip-ids as well.

Fixes: ae8637e13185 ("RDMA/bnxt_re: Add chip context to identify 57500 series")
Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Luke Starrett <luke.starrett@broadcom.com>
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h
index fbda11a..aaa76d7 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h
@@ -186,7 +186,9 @@ struct bnxt_qplib_chip_ctx {
 	u8	chip_metal;
 };
 
-#define CHIP_NUM_57500          0x1750
+#define CHIP_NUM_57508		0x1750
+#define CHIP_NUM_57504		0x1751
+#define CHIP_NUM_57502		0x1752
 
 struct bnxt_qplib_res {
 	struct pci_dev			*pdev;
@@ -203,7 +205,9 @@ struct bnxt_qplib_res {
 
 static inline bool bnxt_qplib_is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx)
 {
-	return (cctx->chip_num == CHIP_NUM_57500);
+	return (cctx->chip_num == CHIP_NUM_57508 ||
+		cctx->chip_num == CHIP_NUM_57504 ||
+		cctx->chip_num == CHIP_NUM_57502);
 }
 
 static inline u8 bnxt_qplib_get_hwq_type(struct bnxt_qplib_res *res)
-- 
1.8.3.1


  reply	other threads:[~2019-11-21  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  6:22 [PATCH V3 for-next 0/3] Broadcom's roce driver bug fixes Devesh Sharma
2019-11-21  6:22 ` Devesh Sharma [this message]
2019-11-21  6:22 ` [PATCH V3 for-next 2/3] RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices Devesh Sharma
2019-11-21  6:22 ` [PATCH V3 for-next 3/3] RDMA/bnxt_re: fix sparse warnings Devesh Sharma
2019-11-22 20:23 ` [PATCH V3 for-next 0/3] Broadcom's roce driver bug fixes Jason Gunthorpe

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=1574317343-23300-2-git-send-email-devesh.sharma@broadcom.com \
    --to=devesh.sharma@broadcom.com \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=luke.starrett@broadcom.com \
    --cc=nareshkumar.pbs@broadcom.com \
    --cc=selvin.xavier@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.