diff mbox series

[for-rc] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series

Message ID 1573881293-3494-1-git-send-email-devesh.sharma@broadcom.com (mailing list archive)
State Superseded
Headers show
Series [for-rc] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series | expand

Commit Message

Devesh Sharma Nov. 16, 2019, 5:14 a.m. UTC
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.

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

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(-)

Comments

Jason Gunthorpe Nov. 18, 2019, 6:11 p.m. UTC | #1
On Sat, Nov 16, 2019 at 12:14:53AM -0500, Devesh Sharma wrote:
> 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.
> 
> Making a change in chip-number validation check to honor
> other chip-ids as well.
> 
> 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(-)

You marked this for-rc without a fixes line

Jason
Devesh Sharma Nov. 19, 2019, 5:22 a.m. UTC | #2
On Mon, Nov 18, 2019 at 11:41 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Sat, Nov 16, 2019 at 12:14:53AM -0500, Devesh Sharma wrote:
> > 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.
> >
> > Making a change in chip-number validation check to honor
> > other chip-ids as well.
> >
> > 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(-)
>
> You marked this for-rc without a fixes line
Yes, I realized after posting the patch let me add that here. In-fact
I have one more fix to go along with this one. I will rather make a
short series of 2 patches.

-Regards
Devesh
>
> Jason
diff mbox series

Patch

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)