mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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: 228ea8c187 ("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>
This commit is contained in:
parent
28d9a84ef0
commit
5204943a4c
|
|
@ -12439,7 +12439,7 @@ static int bnxt_try_recover_fw(struct bnxt *bp)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset)
|
||||
void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset)
|
||||
{
|
||||
struct bnxt_hw_resc *hw_resc = &bp->hw_resc;
|
||||
|
||||
|
|
|
|||
|
|
@ -2941,6 +2941,7 @@ void bnxt_report_link(struct bnxt *bp);
|
|||
int bnxt_update_link(struct bnxt *bp, bool chng_link_state);
|
||||
int bnxt_hwrm_set_pause(struct bnxt *);
|
||||
int bnxt_hwrm_set_link_setting(struct bnxt *, bool, bool);
|
||||
void bnxt_clear_reservations(struct bnxt *bp, bool fw_reset);
|
||||
int bnxt_cancel_reservations(struct bnxt *bp, bool fw_reset);
|
||||
int bnxt_hwrm_alloc_wol_fltr(struct bnxt *bp);
|
||||
int bnxt_hwrm_free_wol_fltr(struct bnxt *bp);
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
|
|||
rtnl_unlock();
|
||||
break;
|
||||
}
|
||||
bnxt_cancel_reservations(bp, false);
|
||||
bnxt_clear_reservations(bp, false);
|
||||
bnxt_free_ctx_mem(bp, false);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user