Skip to content

Commit 03c22ea

Browse files
Ariel Eliordavem330
authored andcommitted
bnx2x: improve VF timings
Wait 100ms for FLR to complete in parallel over all VFs instead of serializing the waits (which can amount to several seconds with 64 VFs). Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent af902ae commit 03c22ea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,9 +1469,6 @@ static u8 bnx2x_vf_is_pcie_pending(struct bnx2x *bp, u8 abs_vfid)
14691469

14701470
int bnx2x_vf_flr_clnup_epilog(struct bnx2x *bp, u8 abs_vfid)
14711471
{
1472-
/* Wait 100ms */
1473-
msleep(100);
1474-
14751472
/* Verify no pending pci transactions */
14761473
if (bnx2x_vf_is_pcie_pending(bp, abs_vfid))
14771474
BNX2X_ERR("PCIE Transactions still pending\n");
@@ -2174,6 +2171,9 @@ int bnx2x_iov_nic_init(struct bnx2x *bp)
21742171

21752172
DP(BNX2X_MSG_IOV, "num of vfs: %d\n", (bp)->vfdb->sriov.nr_virtfn);
21762173

2174+
/* let FLR complete ... */
2175+
msleep(100);
2176+
21772177
/* initialize vf database */
21782178
for_each_vf(bp, vfid) {
21792179
struct bnx2x_virtf *vf = BP_VF(bp, vfid);
@@ -2775,6 +2775,10 @@ int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf, dma_addr_t *sb_map)
27752775
vf->abs_vfid, vf->state);
27762776
return -EINVAL;
27772777
}
2778+
2779+
/* let FLR complete ... */
2780+
msleep(100);
2781+
27782782
/* FLR cleanup epilogue */
27792783
if (bnx2x_vf_flr_clnup_epilog(bp, vf->abs_vfid))
27802784
return -EBUSY;

0 commit comments

Comments
 (0)