bnxt_en: Treat health register value 0 as valid in bnxt_try_reover_fw().

The retry loop in bnxt_try_recover_fw() should not abort when the
health register value is 0.  It is a valid value that indicates the
firmware is booting up.

Fixes: 861aae786f ("bnxt_en: Enhance retry of the first message to the firmware.")
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan 2021-04-11 20:18:11 -04:00 committed by David S. Miller
parent 0d77036057
commit 17e1be342d

View File

@ -9532,8 +9532,8 @@ static int bnxt_try_recover_fw(struct bnxt *bp)
do {
sts = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG);
rc = __bnxt_hwrm_ver_get(bp, true);
if (!sts || (!BNXT_FW_IS_BOOTING(sts) &&
!BNXT_FW_IS_RECOVERING(sts)))
if (!BNXT_FW_IS_BOOTING(sts) &&
!BNXT_FW_IS_RECOVERING(sts))
break;
retry++;
} while (rc == -EBUSY && retry < BNXT_FW_RETRY);