patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] net/nfp: fix DMA error after abnormal exit
@ 2023-11-17  3:14 Chaoyong He
  2023-11-17  3:14 ` [PATCH 21.11] net/nfp: fix link status interrupt Chaoyong He
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Chaoyong He @ 2023-11-17  3:14 UTC (permalink / raw)
  To: stable; +Cc: oss-drivers, Chaoyong He, Shihong Wang, Peng Zhang

[ upstream commit 9e442599802e788874110339901f4eeb8f0ecc3b ]

When DPDK application exit abnormally, there might have DMA error,
and which will cause the load of firmware failed.

Fix this by force the physical port down to clear the possible DMA error.

Fixes: 896c265ef954 ("net/nfp: use new CPP interface")

Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 5729b8a2fd..e1da0bdebe 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -810,6 +810,7 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 	int total_ports;
 	int ret = -ENODEV;
 	int err;
+	uint32_t i;
 
 	if (!pci_dev)
 		return ret;
@@ -846,6 +847,10 @@ static int nfp_pf_init(struct rte_pci_device *pci_dev)
 		goto hwinfo_cleanup;
 	}
 
+	/* Force the physical port down to clear the possible DMA error */
+	for (i = 0; i < nfp_eth_table->count; i++)
+		nfp_eth_set_configured(cpp, nfp_eth_table->ports[i].index, 0);
+
 	if (nfp_fw_setup(pci_dev, cpp, nfp_eth_table, hwinfo)) {
 		PMD_INIT_LOG(ERR, "Error when uploading firmware");
 		ret = -EIO;
-- 
2.39.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-23 10:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17  3:14 [PATCH 21.11] net/nfp: fix DMA error after abnormal exit Chaoyong He
2023-11-17  3:14 ` [PATCH 21.11] net/nfp: fix link status interrupt Chaoyong He
2023-11-17  3:14 ` [PATCH 21.11] net/nfp: fix reconfigure logic in PF initialization Chaoyong He
2023-11-17  3:14 ` [PATCH 21.11] net/nfp: fix reconfigure logic in VF initialization Chaoyong He
2023-11-17  3:15 ` [PATCH 21.11] net/nfp: fix reconfigure logic of set MAC address Chaoyong He
2023-11-23 10:48 ` [PATCH 21.11] net/nfp: fix DMA error after abnormal exit Kevin Traynor

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