diff options
author | Mintz, Yuval <Yuval.Mintz@cavium.com> | 2017-05-29 09:53:09 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-30 12:07:02 -0400 |
commit | 2a351fd9b9ffe4168409e9f6519e048581ba6a41 (patch) | |
tree | 1f30889f885be155e28afc0b42b5ef0390219f83 /drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | |
parent | qed: QL41xxx VF MSI-x table (diff) | |
download | linux-2a351fd9b9ffe4168409e9f6519e048581ba6a41.tar.xz linux-2a351fd9b9ffe4168409e9f6519e048581ba6a41.zip |
qed: Support dynamic s-tag change
In case management firmware indicates a change in the used S-tag,
propagate the configuration to HW and FW.
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_sp_commands.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c index ab09975343cb..46d0c3cb83a5 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c +++ b/drivers/net/ethernet/qlogic/qed/qed_sp_commands.c @@ -514,3 +514,27 @@ int qed_sp_heartbeat_ramrod(struct qed_hwfn *p_hwfn) return qed_spq_post(p_hwfn, p_ent, NULL); } + +int qed_sp_pf_update_stag(struct qed_hwfn *p_hwfn) +{ + struct qed_spq_entry *p_ent = NULL; + struct qed_sp_init_data init_data; + int rc = -EINVAL; + + /* Get SPQ entry */ + memset(&init_data, 0, sizeof(init_data)); + init_data.cid = qed_spq_get_cid(p_hwfn); + init_data.opaque_fid = p_hwfn->hw_info.opaque_fid; + init_data.comp_mode = QED_SPQ_MODE_CB; + + rc = qed_sp_init_request(p_hwfn, &p_ent, + COMMON_RAMROD_PF_UPDATE, PROTOCOLID_COMMON, + &init_data); + if (rc) + return rc; + + p_ent->ramrod.pf_update.update_mf_vlan_flag = true; + p_ent->ramrod.pf_update.mf_vlan = cpu_to_le16(p_hwfn->hw_info.ovlan); + + return qed_spq_post(p_hwfn, p_ent, NULL); +} |