Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16ce6cb7 authored by Michael Chan's avatar Michael Chan Committed by Greg Kroah-Hartman
Browse files

bnxt_en: Add missing check for BNXT_STATE_ABORT_ERR in bnxt_fw_rset_task()



[ Upstream commit 6cd657cb3ee6f4de57e635b126ffbe0e51d00f1a ]

In the BNXT_FW_RESET_STATE_POLL_VF state in bnxt_fw_reset_task() after all
VFs have unregistered, we need to check for BNXT_STATE_ABORT_ERR after
we acquire the rtnl_lock.  If the flag is set, we need to abort.

Fixes: 230d1f0d ("bnxt_en: Handle firmware reset.")
Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c993e7aa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10735,6 +10735,10 @@ static void bnxt_fw_reset_task(struct work_struct *work)
		}
		bp->fw_reset_timestamp = jiffies;
		rtnl_lock();
		if (test_bit(BNXT_STATE_ABORT_ERR, &bp->state)) {
			rtnl_unlock();
			goto fw_reset_abort;
		}
		bnxt_fw_reset_close(bp);
		if (bp->fw_cap & BNXT_FW_CAP_ERR_RECOVER_RELOAD) {
			bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW_DOWN;