Commit 717fa2b9 authored by Ariel Elior's avatar Ariel Elior Committed by David S. Miller

bnx2x: add missing VF resource allocation during init

bnx2x_iov_static_resc() should be called after IGU was read for information on
the number of available VFs, so that resources will be correctly set.
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9ea75ded
...@@ -3180,6 +3180,7 @@ int bnx2x_enable_sriov(struct bnx2x *bp) ...@@ -3180,6 +3180,7 @@ int bnx2x_enable_sriov(struct bnx2x *bp)
/* set local queue arrays */ /* set local queue arrays */
vf->vfqs = &bp->vfdb->vfqs[qcount]; vf->vfqs = &bp->vfdb->vfqs[qcount];
qcount += vf_sb_count(vf); qcount += vf_sb_count(vf);
bnx2x_iov_static_resc(bp, vf);
} }
/* prepare msix vectors in VF configuration space */ /* prepare msix vectors in VF configuration space */
...@@ -3187,6 +3188,8 @@ int bnx2x_enable_sriov(struct bnx2x *bp) ...@@ -3187,6 +3188,8 @@ int bnx2x_enable_sriov(struct bnx2x *bp)
bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx)); bnx2x_pretend_func(bp, HW_VF_HANDLE(bp, vf_idx));
REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL, REG_WR(bp, PCICFG_OFFSET + GRC_CONFIG_REG_VF_MSIX_CONTROL,
num_vf_queues); num_vf_queues);
DP(BNX2X_MSG_IOV, "set msix vec num in VF %d cfg space to %d\n",
vf_idx, num_vf_queues);
} }
bnx2x_pretend_func(bp, BP_ABS_FUNC(bp)); bnx2x_pretend_func(bp, BP_ABS_FUNC(bp));
......
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