From c967098a4c0aafa0cb244ab9423fdea3d943d1ab Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Mon, 3 May 2021 10:51:50 +0530 Subject: [PATCH] net/bnxt: prevent device access in error state 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: be14720def9c ("net/bnxt: support FW reset") Fixes: 9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Andy Gospodarek Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 719eb68847..822853a008 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4275,6 +4275,8 @@ reset: 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)) -- 2.20.1