Skip to content

Commit e50728e

Browse files
Mintz, Yuvaldavem330
authored andcommitted
qed: Always publish VF link from leading hwfn
The link information exists only on the leading hwfn, but some of its derivatives [e.g., min/max rate] need to be configured for each hwfn. When re-basing the VF link view, use the leading hwfn information as basis for all existing hwfns to allow said configurations to stick. Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e99a21c commit e50728e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

drivers/net/ethernet/qlogic/qed/qed_sriov.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,6 +3945,7 @@ static int qed_get_vf_config(struct qed_dev *cdev,
39453945

39463946
void qed_inform_vf_link_state(struct qed_hwfn *hwfn)
39473947
{
3948+
struct qed_hwfn *lead_hwfn = QED_LEADING_HWFN(hwfn->cdev);
39483949
struct qed_mcp_link_capabilities caps;
39493950
struct qed_mcp_link_params params;
39503951
struct qed_mcp_link_state link;
@@ -3961,9 +3962,15 @@ void qed_inform_vf_link_state(struct qed_hwfn *hwfn)
39613962
if (!vf_info)
39623963
continue;
39633964

3964-
memcpy(&params, qed_mcp_get_link_params(hwfn), sizeof(params));
3965-
memcpy(&link, qed_mcp_get_link_state(hwfn), sizeof(link));
3966-
memcpy(&caps, qed_mcp_get_link_capabilities(hwfn),
3965+
/* Only hwfn0 is actually interested in the link speed.
3966+
* But since only it would receive an MFW indication of link,
3967+
* need to take configuration from it - otherwise things like
3968+
* rate limiting for hwfn1 VF would not work.
3969+
*/
3970+
memcpy(&params, qed_mcp_get_link_params(lead_hwfn),
3971+
sizeof(params));
3972+
memcpy(&link, qed_mcp_get_link_state(lead_hwfn), sizeof(link));
3973+
memcpy(&caps, qed_mcp_get_link_capabilities(lead_hwfn),
39673974
sizeof(caps));
39683975

39693976
/* Modify link according to the VF's configured link state */

0 commit comments

Comments
 (0)