Skip to content

Commit 12de2ea

Browse files
Michael Chankuba-moo
authored andcommitted
bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset.
bnxt_ulp_start() needs to be called before SRIOV is re-enabled after firmware reset. Re-enabling SRIOV may consume all the resources and may cause the RDMA driver to fail to get MSIX and other resources. Fix it by calling bnxt_ulp_start() first before calling bnxt_reenable_sriov(). We re-arrange the logic so that we call bnxt_ulp_start() and bnxt_reenable_sriov() in proper sequence in bnxt_fw_reset_task() and bnxt_open(). The former is the normal coordinated firmware reset sequence and the latter is firmware reset while the function is down. This new logic is now more straight forward and will now fix both scenarios. Fixes: f3a6d20 ("bnxt_en: Call bnxt_ulp_stop()/bnxt_ulp_start() during error recovery.") Reported-by: Vasundhara Volam <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c16d4ee commit 12de2ea

File tree

1 file changed

+5
-2
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+5
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9270,9 +9270,10 @@ static int bnxt_open(struct net_device *dev)
92709270
bnxt_hwrm_if_change(bp, false);
92719271
} else {
92729272
if (test_and_clear_bit(BNXT_STATE_FW_RESET_DET, &bp->state)) {
9273-
bnxt_reenable_sriov(bp);
9274-
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
9273+
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state)) {
92759274
bnxt_ulp_start(bp, 0);
9275+
bnxt_reenable_sriov(bp);
9276+
}
92769277
}
92779278
bnxt_hwmon_open(bp);
92789279
}
@@ -10836,6 +10837,8 @@ static void bnxt_fw_reset_task(struct work_struct *work)
1083610837
smp_mb__before_atomic();
1083710838
clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state);
1083810839
bnxt_ulp_start(bp, rc);
10840+
if (!rc)
10841+
bnxt_reenable_sriov(bp);
1083910842
bnxt_dl_health_recovery_done(bp);
1084010843
bnxt_dl_health_status_update(bp, true);
1084110844
rtnl_unlock();

0 commit comments

Comments
 (0)