Skip to content

Commit

Permalink
net/bnxt: prevent device access in error state
Browse files Browse the repository at this point in the history
[ upstream commit c967098 ]

Driver should prevent any DMA with the device when it
detects an error. When firmware is in fatal state,
stop tx/rx by assigning them to dummy functions.

Fixes: be14720 ("net/bnxt: support FW reset")
Fixes: 9d0cbae ("net/bnxt: support periodic FW health monitoring")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
  • Loading branch information
Kalesh AP authored and steevenlee committed Jun 8, 2021
1 parent 00b2343 commit a0a21cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -4254,6 +4254,8 @@ static void bnxt_check_fw_health(void *arg)
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bp->flags |= BNXT_FLAG_FW_RESET;

bnxt_stop_rxtx(bp);

PMD_DRV_LOG(ERR, "Detected FW dead condition\n");

if (bnxt_is_master_func(bp))
Expand Down

0 comments on commit a0a21cb

Please sign in to comment.