[dpdk-dev] [PATCH] net/bnxt: fix to prevent device access in error state

Kalesh A P kalesh-anakkur.purayil at broadcom.com
Mon May 3 07:21:50 CEST 2021


From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>

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 at dpdk.org

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Andy Gospodarek <gospo at broadcom.com>
---
 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 719eb68..822853a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4275,6 +4275,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))
-- 
2.10.1



More information about the dev mailing list