mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 07:56:48 +07:00
bnxt_en: Restrict a PF in Multi-Host mode from changing port PHY configuration
This change restricts the PF in multi-host mode from setting any port level PHY configuration. The settings are controlled by firmware in Multi-Host mode. Signed-off-by: Deepak Khungar <deepak.khungar@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7d63818a35
commit
9e54e322de
@ -4482,10 +4482,15 @@ static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
|
||||
vf->vlan = le16_to_cpu(resp->vlan) & VLAN_VID_MASK;
|
||||
}
|
||||
#endif
|
||||
if (BNXT_PF(bp) && (le16_to_cpu(resp->flags) &
|
||||
(FUNC_QCFG_RESP_FLAGS_FW_DCBX_AGENT_ENABLED |
|
||||
FUNC_QCFG_RESP_FLAGS_FW_LLDP_AGENT_ENABLED)))
|
||||
bp->flags |= BNXT_FLAG_FW_LLDP_AGENT;
|
||||
if (BNXT_PF(bp)) {
|
||||
u16 flags = le16_to_cpu(resp->flags);
|
||||
|
||||
if (flags & (FUNC_QCFG_RESP_FLAGS_FW_DCBX_AGENT_ENABLED |
|
||||
FUNC_QCFG_RESP_FLAGS_FW_LLDP_AGENT_ENABLED))
|
||||
bp->flags |= BNXT_FLAG_FW_LLDP_AGENT;
|
||||
if (flags & FUNC_QCFG_RESP_FLAGS_MULTI_HOST)
|
||||
bp->flags |= BNXT_FLAG_MULTI_HOST;
|
||||
}
|
||||
|
||||
switch (resp->port_partition_type) {
|
||||
case FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0:
|
||||
|
@ -1005,6 +1005,7 @@ struct bnxt {
|
||||
#define BNXT_FLAG_NO_AGG_RINGS 0x20000
|
||||
#define BNXT_FLAG_RX_PAGE_MODE 0x40000
|
||||
#define BNXT_FLAG_FW_LLDP_AGENT 0x80000
|
||||
#define BNXT_FLAG_MULTI_HOST 0x100000
|
||||
#define BNXT_FLAG_CHIP_NITRO_A0 0x1000000
|
||||
|
||||
#define BNXT_FLAG_ALL_CONFIG_FEATS (BNXT_FLAG_TPA | \
|
||||
@ -1014,7 +1015,8 @@ struct bnxt {
|
||||
#define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF))
|
||||
#define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF)
|
||||
#define BNXT_NPAR(bp) ((bp)->port_partition_type)
|
||||
#define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp))
|
||||
#define BNXT_MH(bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST)
|
||||
#define BNXT_SINGLE_PF(bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp))
|
||||
#define BNXT_CHIP_TYPE_NITRO_A0(bp) ((bp)->flags & BNXT_FLAG_CHIP_NITRO_A0)
|
||||
#define BNXT_RX_PAGE_MODE(bp) ((bp)->flags & BNXT_FLAG_RX_PAGE_MODE)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user