]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bnxt_en: Set NPAR 1.2 support when registering with firmware
authorMichael Chan <michael.chan@broadcom.com>
Thu, 13 Feb 2025 01:12:29 +0000 (17:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:21 +0000 (11:13 +0200)
[ Upstream commit ebdf7fe488c512b18add66b6c26e11e4d3830213 ]

NPAR (Network interface card partitioning)[1] 1.2 adds a transparent
VLAN tag for all packets between the NIC and the switch.  Because of
that, RX VLAN acceleration cannot be supported for any additional
host configured VLANs.  The driver has to acknowledge that it can
support no RX VLAN acceleration and set the NPAR 1.2 supported flag
when registering with the FW.  Otherwise, the FW call will fail and
the driver will abort on these NPAR 1.2 NICs with this error:

bnxt_en 0000:26:00.0 (unnamed net_device) (uninitialized): hwrm req_type 0x1d seq id 0xb error 0x2

[1] https://techdocs.broadcom.com/us/en/storage-and-ethernet-connectivity/ethernet-nic-controllers/bcm957xxx/adapters/introduction/features/network-partitioning-npar.html

Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250213011240.1640031-2-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h

index 1a19c922009d1a564599e8624a21d80f71c4ce20..d844cf621dd236c20c9034728bb5948498681f86 100644 (file)
@@ -5589,6 +5589,8 @@ int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp, unsigned long *bmap, int bmap_size,
        if (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)
                flags |= FUNC_DRV_RGTR_REQ_FLAGS_ERROR_RECOVERY_SUPPORT |
                         FUNC_DRV_RGTR_REQ_FLAGS_MASTER_SUPPORT;
+       if (bp->fw_cap & BNXT_FW_CAP_NPAR_1_2)
+               flags |= FUNC_DRV_RGTR_REQ_FLAGS_NPAR_1_2_SUPPORT;
        req->flags = cpu_to_le32(flags);
        req->ver_maj_8b = DRV_VER_MAJ;
        req->ver_min_8b = DRV_VER_MIN;
@@ -8389,6 +8391,7 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
 
        switch (resp->port_partition_type) {
        case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0:
+       case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_2:
        case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5:
        case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR2_0:
                bp->port_partition_type = resp->port_partition_type;
@@ -9553,6 +9556,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
                bp->fw_cap |= BNXT_FW_CAP_HOT_RESET_IF;
        if (BNXT_PF(bp) && (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_FW_LIVEPATCH_SUPPORTED))
                bp->fw_cap |= BNXT_FW_CAP_LIVEPATCH;
+       if (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_NPAR_1_2_SUPPORTED)
+               bp->fw_cap |= BNXT_FW_CAP_NPAR_1_2;
        if (BNXT_PF(bp) && (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_DFLT_VLAN_TPID_PCP_SUPPORTED))
                bp->fw_cap |= BNXT_FW_CAP_DFLT_VLAN_TPID_PCP;
        if (flags_ext & FUNC_QCAPS_RESP_FLAGS_EXT_BS_V2_SUPPORTED)
index d621fb621f30c7cc9784efcdeeca562e205b99c3..f91d9d8eacb97293031d070efc68ce2f79d4cd71 100644 (file)
@@ -2498,6 +2498,7 @@ struct bnxt {
        #define BNXT_FW_CAP_CFA_RFS_RING_TBL_IDX_V3     BIT_ULL(39)
        #define BNXT_FW_CAP_VNIC_RE_FLUSH               BIT_ULL(40)
        #define BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS      BIT_ULL(41)
+       #define BNXT_FW_CAP_NPAR_1_2                    BIT_ULL(42)
 
        u32                     fw_dbg_cap;