bnxt_en: Treat health register value 0 as valid in bnxt_try_reover_fw().
authorMichael Chan <michael.chan@broadcom.com>
Mon, 12 Apr 2021 00:18:11 +0000 (20:18 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Apr 2021 20:20:38 +0000 (13:20 -0700)
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: 861aae786f2f ("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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 6f13642..3d36f94 100644 (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);