From: Kalesh AP Date: Mon, 3 May 2021 05:21:50 +0000 (+0530) Subject: net/bnxt: prevent device access in error state X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c967098a4c0aafa0cb244ab9423fdea3d943d1ab;p=dpdk.git 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 --- 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))