Skip to content

Commit 325f85f

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Free context memory in the open path if firmware has been reset.
This will trigger new context memory to be rediscovered and allocated during the re-probe process after a firmware reset. Without this, the newly reset firmware does not have valid context memory and the driver will eventually fail to allocate some resources. Fixes: ec5d31e ("bnxt_en: Handle firmware reset status during IF_UP.") Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0c722ec commit 325f85f

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8796,6 +8796,9 @@ static int bnxt_hwrm_if_change(struct bnxt *bp, bool up)
87968796
if (fw_reset) {
87978797
if (!test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
87988798
bnxt_ulp_stop(bp);
8799+
bnxt_free_ctx_mem(bp);
8800+
kfree(bp->ctx);
8801+
bp->ctx = NULL;
87998802
rc = bnxt_fw_init_one(bp);
88008803
if (rc) {
88018804
set_bit(BNXT_STATE_ABORT_ERR, &bp->state);

0 commit comments

Comments
 (0)