File bnxt_re-lib-Recognize-additional-5750x-device-ID-s.patch of Package rdma-core.13525

commit dd7ebf978218d3a7b1b4e96bc628f9ffbb8a83d0
Author: Luke Starrett <luke.starrett@broadcom.com>
Date:   Tue Nov 26 04:11:28 2019 -0500

    bnxt_re/lib: Recognize additional 5750x device ID's
    
    BCM5750x family includes 57504 and 57502. Until recently the chip_num
    register always conveyed 0x1750 (57508). Recent devices properly
    reflect the SKU in the chip_num register. Update Phase5 checks to
    reflect this.
    
    Signed-off-by: Luke Starrett <luke.starrett@broadcom.com>
    Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>

diff --git providers/bnxt_re/main.c providers/bnxt_re/main.c
index c96090894cbe..10a6b468695e 100644
--- providers/bnxt_re/main.c
+++ providers/bnxt_re/main.c
@@ -74,7 +74,7 @@ static const struct verbs_match_ent cna_table[] = {
 	CNA(BROADCOM, 0x16EF),  /* BCM57416 NPAR */
 	CNA(BROADCOM, 0x16F0),  /* BCM58730 */
 	CNA(BROADCOM, 0x16F1),  /* BCM57452 */
-	CNA(BROADCOM, 0x1750),	/* BCM57500 */
+	CNA(BROADCOM, 0x1750),	/* BCM57508 */
 	CNA(BROADCOM, 0x1751),	/* BCM57504 */
 	CNA(BROADCOM, 0x1752),	/* BCM57502 */
 	CNA(BROADCOM, 0x1803),	/* BCM57508 NPAR */
@@ -117,7 +117,9 @@ static const struct verbs_context_ops bnxt_re_cntx_ops = {
 
 bool bnxt_re_is_chip_gen_p5(struct bnxt_re_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);
 }
 
 /* Context Init functions */
diff --git providers/bnxt_re/main.h providers/bnxt_re/main.h
index be5734960475..368297e68b7a 100644
--- providers/bnxt_re/main.h
+++ providers/bnxt_re/main.h
@@ -56,7 +56,10 @@
 
 #define BNXT_RE_UD_QP_HW_STALL	0x400000
 
-#define CHIP_NUM_57500		0x1750
+#define CHIP_NUM_57508		0x1750
+#define CHIP_NUM_57504		0x1751
+#define CHIP_NUM_57502		0x1752
+
 struct bnxt_re_chip_ctx {
 	__u16 chip_num;
 	__u8 chip_rev;