From 0bff716674418ec9f8c48131fb34cafc0af671e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= Date: Sat, 29 Jun 2024 02:16:43 -0300 Subject: [PATCH] /sys/dev/bnxt: Enable NPAR support on BCM57504 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit enables NPAR support for Broadcom 57504 10/25GbE NICs Signed-off-by: Vinícius Ferrão Reviewed by: imp,ssaxena,nightquick@proton.me Pull Request: https://github.com/freebsd/freebsd-src/pull/1306 --- sys/dev/bnxt/bnxt_en/bnxt.h | 1 + sys/dev/bnxt/bnxt_en/if_bnxt.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index cf4f99077b58bf..c5fadeafa18163 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -86,6 +86,7 @@ #define BCM58700 0x16cd #define BCM57508 0x1750 #define BCM57504 0x1751 +#define BCM57504_NPAR 0x1801 #define BCM57502 0x1752 #define NETXTREME_C_VF1 0x16cb #define NETXTREME_C_VF2 0x16e1 diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 6c0ec892f2c67b..00d37f5e0151a0 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -143,6 +143,8 @@ static const pci_vendor_info_t bnxt_vendor_info_array[] = "Broadcom BCM57508 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, BCM57504, "Broadcom BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57504_NPAR, + "Broadcom BCM57504 NetXtreme-E Ethernet Partition"), PVID(BROADCOM_VENDOR_ID, BCM57502, "Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF1, @@ -2087,6 +2089,7 @@ bnxt_attach_pre(if_ctx_t ctx) case BCM57414_NPAR2: case BCM57416_NPAR1: case BCM57416_NPAR2: + case BCM57504_NPAR: softc->flags |= BNXT_FLAG_NPAR; break; case NETXTREME_C_VF1: @@ -2170,6 +2173,7 @@ bnxt_attach_pre(if_ctx_t ctx) if ((softc->ver_info->chip_num == BCM57508) || (softc->ver_info->chip_num == BCM57504) || + (softc->ver_info->chip_num == BCM57504_NPAR) || (softc->ver_info->chip_num == BCM57502)) softc->flags |= BNXT_FLAG_CHIP_P5;