From: Kalesh A P <kalesh-anakkur.purayil@broadcom.com>
To: stable@dpdk.org
Subject: [dpdk-stable] [PATCH 19.11 3/6] net/bnxt: invoke device removal event on recovery failure
Date: Mon, 16 Aug 2021 20:20:56 +0530 [thread overview]
Message-ID: <20210816145059.31065-4-kalesh-anakkur.purayil@broadcom.com> (raw)
In-Reply-To: <20210816145059.31065-1-kalesh-anakkur.purayil@broadcom.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
[ upstream commit 8ac3cbba621ad1887b069b271115faf76bf04b75 ]
When the driver receives RESET_NOTIFY async event from FW or detects
a FW fatal error condition, it tries to recover from the error.
When the driver fails to recover from the error condition, fixed to
send device removal event to the application.
Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_ethdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 35f33b8..4d428b6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4288,6 +4288,10 @@ static void bnxt_dev_recover(void *arg)
err:
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bnxt_uninit_resources(bp, false);
+ if (bp->eth_dev->data->dev_conf.intr_conf.rmv)
+ _rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_INTR_RMV,
+ NULL);
PMD_DRV_LOG(ERR, "Failed to recover from FW reset\n");
}
@@ -5236,7 +5240,8 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev)
static struct rte_pci_driver bnxt_rte_pmd = {
.id_table = bnxt_pci_id_map,
- .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+ .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+ RTE_PCI_DRV_INTR_RMV,
.probe = bnxt_pci_probe,
.remove = bnxt_pci_remove,
};
--
2.10.1
next prev parent reply other threads:[~2021-08-16 14:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 14:50 [dpdk-stable] [PATCH 19.11 0/6] backport bnxt fixes to 19.11 Kalesh A P
2021-08-16 14:50 ` [dpdk-stable] [PATCH 19.11 1/6] net/bnxt: fix auto-negotiation on Whitney+ Kalesh A P
2021-08-16 14:50 ` [dpdk-stable] [PATCH 19.11 2/6] net/bnxt: remove unnecessary comment Kalesh A P
2021-08-16 14:50 ` Kalesh A P [this message]
2021-08-16 14:50 ` [dpdk-stable] [PATCH 19.11 4/6] net/bnxt: detect bad opaque in Rx completion Kalesh A P
2021-08-16 14:50 ` [dpdk-stable] [PATCH 19.11 5/6] net/bnxt: workaround spurious zero stats in Thor Kalesh A P
2021-08-16 14:50 ` [dpdk-stable] [PATCH 19.11 6/6] net/bnxt: clear cached statistics Kalesh A P
2021-08-17 9:40 ` [dpdk-stable] [PATCH 19.11 0/6] backport bnxt fixes to 19.11 Christian Ehrhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210816145059.31065-4-kalesh-anakkur.purayil@broadcom.com \
--to=kalesh-anakkur.purayil@broadcom.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).