diff --git a/sys/dev/bnxt/bnxt.h b/sys/dev/bnxt/bnxt.h index dee88885e8a8..608c1b89d2af 100644 --- a/sys/dev/bnxt/bnxt.h +++ b/sys/dev/bnxt/bnxt.h @@ -52,16 +52,39 @@ __FBSDID("$FreeBSD$"); #define BCM57301 0x16c8 #define BCM57302 0x16c9 #define BCM57304 0x16ca +#define BCM57311 0x16ce +#define BCM57312 0x16cf +#define BCM57314 0x16df #define BCM57402 0x16d0 -#define BCM57404 0x16d1 -#define BCM57406 0x16d2 #define BCM57402_NPAR 0x16d4 -#define BCM57407 0x16d5 +#define BCM57404 0x16d1 #define BCM57404_NPAR 0x16e7 +#define BCM57406 0x16d2 #define BCM57406_NPAR 0x16e8 +#define BCM57407 0x16d5 +#define BCM57407_NPAR 0x16ea #define BCM57407_SFP 0x16e9 -#define BCM57304_VF 0x16cb -#define BCM57404_VF 0x16d3 +#define BCM57412 0x16d6 +#define BCM57412_NPAR1 0x16de +#define BCM57412_NPAR2 0x16eb +#define BCM57414 0x16d7 +#define BCM57414_NPAR1 0x16ec +#define BCM57414_NPAR2 0x16ed +#define BCM57416 0x16d8 +#define BCM57416_NPAR1 0x16ee +#define BCM57416_NPAR2 0x16ef +#define BCM57416_SFP 0x16e3 +#define BCM57417 0x16d9 +#define BCM57417_NPAR1 0x16c0 +#define BCM57417_NPAR2 0x16cc +#define BCM57417_SFP 0x16e2 +#define BCM58700 0x16cd +#define NETXTREME_C_VF1 0x16cb +#define NETXTREME_C_VF2 0x16e1 +#define NETXTREME_C_VF3 0x16e5 +#define NETXTREME_E_VF1 0x16c1 +#define NETXTREME_E_VF2 0x16d3 +#define NETXTREME_E_VF3 0x16dc #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ diff --git a/sys/dev/bnxt/if_bnxt.c b/sys/dev/bnxt/if_bnxt.c index 261b83e93c3a..207e71e7f6be 100644 --- a/sys/dev/bnxt/if_bnxt.c +++ b/sys/dev/bnxt/if_bnxt.c @@ -75,26 +75,72 @@ static pci_vendor_info_t bnxt_vendor_info_array[] = "Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57304, "Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57311, + "Broadcom BCM57311 NetXtreme-C 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57312, + "Broadcom BCM57312 NetXtreme-C 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57314, + "Broadcom BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, BCM57402, "Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57404, - "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57406, - "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57402_NPAR, "Broadcom BCM57402 NetXtreme-E Partition"), - PVID(BROADCOM_VENDOR_ID, BCM57407, - "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57404, + "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57404_NPAR, "Broadcom BCM57404 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57406, + "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57406_NPAR, "Broadcom BCM57406 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57407, + "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57407_NPAR, + "Broadcom BCM57407 NetXtreme-E Ethernet Partition"), PVID(BROADCOM_VENDOR_ID, BCM57407_SFP, "Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57304_VF, - "Broadcom BCM57304 NetXtreme-C Virtual Function"), - PVID(BROADCOM_VENDOR_ID, BCM57404_VF, - "Broadcom BCM57404 NetXtreme-E Virtual Function"), + PVID(BROADCOM_VENDOR_ID, BCM57412, + "Broadcom BCM57412 NetXtreme-E 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57412_NPAR1, + "Broadcom BCM57412 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57412_NPAR2, + "Broadcom BCM57412 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57414, + "Broadcom BCM57414 NetXtreme-E 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57414_NPAR1, + "Broadcom BCM57414 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57414_NPAR2, + "Broadcom BCM57414 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416, + "Broadcom BCM57416 NetXtreme-E 10GBase-T Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57416_NPAR1, + "Broadcom BCM57416 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416_NPAR2, + "Broadcom BCM57416 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416_SFP, + "Broadcom BCM57416 NetXtreme-E 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57417, + "Broadcom BCM57417 NetXtreme-E 10GBase-T Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57417_NPAR1, + "Broadcom BCM57417 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57417_NPAR2, + "Broadcom BCM57417 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57417_SFP, + "Broadcom BCM57417 NetXtreme-E 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM58700, + "Broadcom BCM58700 Nitro 1Gb/2.5Gb/10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF1, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF2, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF3, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF1, + "Broadcom NetXtreme-E Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF2, + "Broadcom NetXtreme-E Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF3, + "Broadcom NetXtreme-E Ethernet Virtual Function"), /* required last entry */ PVID_END @@ -540,14 +586,26 @@ bnxt_attach_pre(if_ctx_t ctx) softc->sctx = iflib_get_sctx(ctx); scctx = softc->scctx; + /* TODO: Better way of detecting NPAR/VF is needed */ switch (softc->sctx->isc_vendor_info->pvi_device_id) { case BCM57402_NPAR: case BCM57404_NPAR: case BCM57406_NPAR: + case BCM57407_NPAR: + case BCM57412_NPAR1: + case BCM57412_NPAR2: + case BCM57414_NPAR1: + case BCM57414_NPAR2: + case BCM57416_NPAR1: + case BCM57416_NPAR2: softc->flags |= BNXT_FLAG_NPAR; break; - case BCM57304_VF: - case BCM57404_VF: + case NETXTREME_C_VF1: + case NETXTREME_C_VF2: + case NETXTREME_C_VF3: + case NETXTREME_E_VF1: + case NETXTREME_E_VF2: + case NETXTREME_E_VF3: softc->flags |= BNXT_FLAG_VF; break; }