diff mbox series

net/bnxt: fix to prevent device access in error state

Message ID 20210503052150.29189-1-kalesh-anakkur.purayil@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers show
Series net/bnxt: fix to prevent device access in error state | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Kalesh A P May 3, 2021, 5:21 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@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@dpdk.org

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>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ajit Khaparde May 4, 2021, 4:01 a.m. UTC | #1
On Sun, May 2, 2021 at 10:00 PM Kalesh A P <
kalesh-anakkur.purayil@broadcom.com> wrote:

> From: Kalesh AP <kalesh-anakkur.purayil@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@dpdk.org
>
> 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>
>
Patch applied to dpdk-next-net-brcm. Thanks


> ---
>  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
>
>
diff mbox series

Patch

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))