Skip to content

Commit

Permalink
bnxt_en: Clear resource reservation during resume
Browse files Browse the repository at this point in the history
We are issuing HWRM_FUNC_RESET cmd to reset the device including
all reserved resources, but not clearing the reservations
within the driver struct. As a result, when the driver re-initializes
as part of resume, it believes that there is no need to do any
resource reservation and goes ahead and tries to allocate rings
which will eventually fail beyond a certain number pre-reserved by
the firmware.

Fixes: 674f50a ("bnxt_en: Implement new method to reserve rings.")
Reviewed-by: Kalesh AP <[email protected]>
Reviewed-by: Ajit Khaparde <[email protected]>
Reviewed-by: Andy Gospodarek <[email protected]>
Signed-off-by: Somnath Kotur <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
skotur-brcm authored and kuba-moo committed Dec 9, 2023
1 parent 9c25aae commit 9ef7c58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/bnxt/bnxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -13940,6 +13940,8 @@ static int bnxt_resume(struct device *device)
if (rc)
goto resume_exit;

bnxt_clear_reservations(bp, true);

if (bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) {
rc = -ENODEV;
goto resume_exit;
Expand Down

0 comments on commit 9ef7c58

Please sign in to comment.