Blame SOURCES/0002-bnxt_re-lib-Recognize-additional-5750x-device-ID-s.patch

34d875
From 2d7c483d8a855e01e7bf2d945ab8720a10262bab Mon Sep 17 00:00:00 2001
34d875
From: Luke Starrett <luke.starrett@broadcom.com>
34d875
Date: Tue, 26 Nov 2019 04:11:28 -0500
34d875
Subject: [PATCH 2/2] bnxt_re/lib: Recognize additional 5750x device ID's
34d875
34d875
BCM5750x family includes 57504 and 57502. Until recently the chip_num
34d875
register always conveyed 0x1750 (57508). Recent devices properly
34d875
reflect the SKU in the chip_num register. Update Phase5 checks to
34d875
reflect this.
34d875
34d875
Signed-off-by: Luke Starrett <luke.starrett@broadcom.com>
34d875
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
34d875
---
34d875
 providers/bnxt_re/main.c | 6 ++++--
34d875
 providers/bnxt_re/main.h | 5 ++++-
34d875
 2 files changed, 8 insertions(+), 3 deletions(-)
34d875
34d875
diff --git a/providers/bnxt_re/main.c b/providers/bnxt_re/main.c
34d875
index e290a07bc502..803eff79e73a 100644
34d875
--- a/providers/bnxt_re/main.c
34d875
+++ b/providers/bnxt_re/main.c
34d875
@@ -75,7 +75,7 @@ static const struct verbs_match_ent cna_table[] = {
34d875
 	CNA(BROADCOM, 0x16EF),  /* BCM57416 NPAR */
34d875
 	CNA(BROADCOM, 0x16F0),  /* BCM58730 */
34d875
 	CNA(BROADCOM, 0x16F1),  /* BCM57452 */
34d875
-	CNA(BROADCOM, 0x1750),	/* BCM57500 */
34d875
+	CNA(BROADCOM, 0x1750),	/* BCM57508 */
34d875
 	CNA(BROADCOM, 0x1751),	/* BCM57504 */
34d875
 	CNA(BROADCOM, 0x1752),	/* BCM57502 */
34d875
 	CNA(BROADCOM, 0x1803),	/* BCM57508 NPAR */
34d875
@@ -118,7 +118,9 @@ static const struct verbs_context_ops bnxt_re_cntx_ops = {
34d875
 
34d875
 bool bnxt_re_is_chip_gen_p5(struct bnxt_re_chip_ctx *cctx)
34d875
 {
34d875
-	return cctx->chip_num == CHIP_NUM_57500;
34d875
+	return (cctx->chip_num == CHIP_NUM_57508 ||
34d875
+		cctx->chip_num == CHIP_NUM_57504 ||
34d875
+		cctx->chip_num == CHIP_NUM_57502);
34d875
 }
34d875
 
34d875
 /* Context Init functions */
34d875
diff --git a/providers/bnxt_re/main.h b/providers/bnxt_re/main.h
34d875
index be5734960475..368297e68b7a 100644
34d875
--- a/providers/bnxt_re/main.h
34d875
+++ b/providers/bnxt_re/main.h
34d875
@@ -56,7 +56,10 @@
34d875
 
34d875
 #define BNXT_RE_UD_QP_HW_STALL	0x400000
34d875
 
34d875
-#define CHIP_NUM_57500		0x1750
34d875
+#define CHIP_NUM_57508		0x1750
34d875
+#define CHIP_NUM_57504		0x1751
34d875
+#define CHIP_NUM_57502		0x1752
34d875
+
34d875
 struct bnxt_re_chip_ctx {
34d875
 	__u16 chip_num;
34d875
 	__u8 chip_rev;
34d875
-- 
34d875
2.25.2
34d875