You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kmod-redhat-bnxt_en/SOURCES/0087-netdrv-bnxt_en-Adjust-...

59 lines
2.5 KiB

From ef7f935ad4295dbc775456efd99c583cd51eaa74 Mon Sep 17 00:00:00 2001
From: Jonathan Toppins <jtoppins@redhat.com>
Date: Fri, 6 Dec 2019 20:12:43 -0500
Subject: [PATCH 87/96] [netdrv] bnxt_en: Adjust the time to wait before
polling firmware readiness
Message-id: <b727698b6103985a26da3cd6e0c57fc1dca21cd7.1575651771.git.jtoppins@redhat.com>
Patchwork-id: 291376
O-Subject: [PATCH rhel8 03/13] bnxt_en: Adjust the time to wait before polling firmware readiness.
Bugzilla: 1773724
RH-Acked-by: Steve Best <sbest@redhat.com>
RH-Acked-by: David Arcari <darcari@redhat.com>
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
RH-Acked-by: John Linville <linville@redhat.com>
When firmware indicates that driver needs to invoke firmware reset
which is common for both error recovery and live firmware reset path,
driver needs a different time to wait before polling for firmware
readiness.
Modify the wait time to fw_reset_min_dsecs, which is initialised to
correct timeout for error recovery and firmware reset.
Fixes: 4037eb715680 ("bnxt_en: Add a new BNXT_FW_RESET_STATE_POLL_FW_DOWN state.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
(cherry picked from commit c6a9e7aa2e8b15402022a15625284069d4fd6df0)
Bugzilla: 1773724
Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25154853
Tested: simple boot test
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: src/drivers/net/ethernet/broadcom/bnxt/bnxt.c
===================================================================
--- src.orig/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:21.672458426 +0100
+++ src/drivers/net/ethernet/broadcom/bnxt/bnxt.c 2020-02-06 16:23:22.071454764 +0100
@@ -10674,14 +10674,11 @@
bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
}
/* fall through */
- case BNXT_FW_RESET_STATE_RESET_FW: {
- u32 wait_dsecs = bp->fw_health->post_reset_wait_dsecs;
-
+ case BNXT_FW_RESET_STATE_RESET_FW:
bnxt_reset_all(bp);
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
- bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10);
+ bnxt_queue_fw_reset_work(bp, bp->fw_reset_min_dsecs * HZ / 10);
return;
- }
case BNXT_FW_RESET_STATE_ENABLE_DEV:
if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) &&
bp->fw_health) {