Skip to contentSkip to conversation

RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series

PATCH In review Devesh Sharma 2 participants 3 messages Nov 16, 2019 – Nov 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series

From: Luke Starrett <[email protected]>

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.

---
 drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/infiniband/hw/bnxt_re/qplib_res.h +6 -2
index fbda11a..aaa76d7 100644
@@ -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)
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 9 lines · Devesh Sharma

From: Luke Starrett <[email protected]>

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.

Quoted 7 lines
---
 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

#2 lore raw
Quoted 19 lines · Jason Gunthorpe
Quoted 9 lines · Devesh Sharma

From: Luke Starrett <[email protected]>

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.

Quoted 7 lines
---
 drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Quoted 1 line

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

Quoted 2 lines

Jason