Skip to content

Commit 5204943

Browse files
shantiprasadsshettarkuba-moo
authored andcommitted
bnxt_en: Fix warning in bnxt_dl_reload_down()
The existing code calls bnxt_cancel_reservations() after bnxt_hwrm_func_drv_unrgtr() in bnxt_dl_reload_down(). bnxt_cancel_reservations() calls the FW and it will always fail since the driver has already unregistered, triggering this warning: bnxt_en 0000:0a:00.0 ens2np0: resc_qcaps failed Fix it by calling bnxt_clear_reservations() which will skip the unnecessary FW call since we have unregistered. Fixes: 228ea8c ("bnxt_en: implement devlink dev reload driver_reinit") Reviewed-by: Mohammad Shuab Siddique <mohammad-shuab.siddique@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Shantiprasad Shettar <shantiprasad.shettar@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Link: https://patch.msgid.link/20251104005700.542174-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 28d9a84 commit 5204943

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12439,7 +12439,7 @@ static int bnxt_try_recover_fw(struct bnxt *bp)
1243912439
return -ENODEV;
1244012440
}
1244112441

12442-
static void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset)
12442+
void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset)
1244312443
{
1244412444
struct bnxt_hw_resc *hw_resc = &bp->hw_resc;
1244512445

drivers/net/ethernet/broadcom/bnxt/bnxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,7 @@ void bnxt_report_link(struct bnxt *bp);
29412941
int bnxt_update_link(struct bnxt *bp, bool chng_link_state);
29422942
int bnxt_hwrm_set_pause(struct bnxt *);
29432943
int bnxt_hwrm_set_link_setting(struct bnxt *, bool, bool);
2944+
void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset);
29442945
int bnxt_cancel_reservations(struct bnxt *bp, bool fw_reset);
29452946
int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp);
29462947
int bnxt_hwrm_free_wol_fltr(struct bnxt *bp);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
461461
rtnl_unlock();
462462
break;
463463
}
464-
bnxt_cancel_reservations(bp, false);
464+
bnxt_clear_reservations(bp, false);
465465
bnxt_free_ctx_mem(bp, false);
466466
break;
467467
}

0 commit comments

Comments
 (0)