aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>2019-10-21 01:34:27 -0400
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-10-22 16:15:39 -0400
commitc6a9e7aa2e8b15402022a15625284069d4fd6df0 (patch)
tree14e72e7316f14b52bd1a485bb6c910184e441370
parent83a46a82b96c1928ad82958752523fb0c7d9fcce (diff)
bnxt_en: Adjust the time to wait before polling firmware readiness.
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>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b4a8cf620a0c..84926184bed2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -10669,14 +10669,11 @@ static void bnxt_fw_reset_task(struct work_struct *work)
10669 bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW; 10669 bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
10670 } 10670 }
10671 /* fall through */ 10671 /* fall through */
10672 case BNXT_FW_RESET_STATE_RESET_FW: { 10672 case BNXT_FW_RESET_STATE_RESET_FW:
10673 u32 wait_dsecs = bp->fw_health->post_reset_wait_dsecs;
10674
10675 bnxt_reset_all(bp); 10673 bnxt_reset_all(bp);
10676 bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV; 10674 bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
10677 bnxt_queue_fw_reset_work(bp, wait_dsecs * HZ / 10); 10675 bnxt_queue_fw_reset_work(bp, bp->fw_reset_min_dsecs * HZ / 10);
10678 return; 10676 return;
10679 }
10680 case BNXT_FW_RESET_STATE_ENABLE_DEV: 10677 case BNXT_FW_RESET_STATE_ENABLE_DEV:
10681 if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) && 10678 if (test_bit(BNXT_STATE_FW_FATAL_COND, &bp->state) &&
10682 bp->fw_health) { 10679 bp->fw_health) {