Commit bc39f885 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Check if firmware LLDP agent is running.

Set DCB_CAP_DCBX_HOST capability flag only if the firmware LLDP agent
is not running.
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b386cd36
...@@ -4465,6 +4465,10 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp) ...@@ -4465,6 +4465,10 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
vf->vlan = le16_to_cpu(resp->vlan) & VLAN_VID_MASK; vf->vlan = le16_to_cpu(resp->vlan) & VLAN_VID_MASK;
} }
#endif #endif
if (BNXT_PF(bp) && (le16_to_cpu(resp->flags) &
FUNC_QCFG_RESP_FLAGS_FW_DCBX_AGENT_ENABLED))
bp->flags |= BNXT_FLAG_FW_LLDP_AGENT;
switch (resp->port_partition_type) { switch (resp->port_partition_type) {
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0: case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0:
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5: case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_5:
......
...@@ -993,6 +993,7 @@ struct bnxt { ...@@ -993,6 +993,7 @@ struct bnxt {
BNXT_FLAG_ROCEV2_CAP) BNXT_FLAG_ROCEV2_CAP)
#define BNXT_FLAG_NO_AGG_RINGS 0x20000 #define BNXT_FLAG_NO_AGG_RINGS 0x20000
#define BNXT_FLAG_RX_PAGE_MODE 0x40000 #define BNXT_FLAG_RX_PAGE_MODE 0x40000
#define BNXT_FLAG_FW_LLDP_AGENT 0x80000
#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000 #define BNXT_FLAG_CHIP_NITRO_A0 0x1000000
#define BNXT_FLAG_ALL_CONFIG_FEATS (BNXT_FLAG_TPA | \ #define BNXT_FLAG_ALL_CONFIG_FEATS (BNXT_FLAG_TPA | \
......
...@@ -474,7 +474,7 @@ void bnxt_dcb_init(struct bnxt *bp) ...@@ -474,7 +474,7 @@ void bnxt_dcb_init(struct bnxt *bp)
return; return;
bp->dcbx_cap = DCB_CAP_DCBX_VER_IEEE; bp->dcbx_cap = DCB_CAP_DCBX_VER_IEEE;
if (BNXT_PF(bp)) if (BNXT_PF(bp) && !(bp->flags & BNXT_FLAG_FW_LLDP_AGENT))
bp->dcbx_cap |= DCB_CAP_DCBX_HOST; bp->dcbx_cap |= DCB_CAP_DCBX_HOST;
else else
bp->dcbx_cap |= DCB_CAP_DCBX_LLD_MANAGED; bp->dcbx_cap |= DCB_CAP_DCBX_LLD_MANAGED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment