[PATCH v2 05/25] net/axgbe: disable interrupts during device removal
Sebastian, Selwin
Selwin.Sebastian at amd.com
Mon May 20 12:41:26 CEST 2024
[AMD Official Use Only - AMD Internal Distribution Only]
Acked-by: Selwin Sebastian<selwin.sebastian at amd.com>
-----Original Message-----
From: Ande, Venkat Kumar <VenkatKumar.Ande at amd.com>
Sent: Tuesday, May 7, 2024 6:13 PM
To: dev at dpdk.org
Cc: Sebastian, Selwin <Selwin.Sebastian at amd.com>; Ande, Venkat Kumar <VenkatKumar.Ande at amd.com>; stable at dpdk.org
Subject: [PATCH v2 05/25] net/axgbe: disable interrupts during device removal
Hardware interrupts are enabled during the init, however, they are not disabled during close.
Disable all hardware interrupts during close operation to avoid any issues.
Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup")
Cc: stable at dpdk.org
Signed-off-by: Venkat Kumar Ande <venkatkumar.ande at amd.com>
---
drivers/net/axgbe/axgbe_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index dd681f15a0..e5d8f7db02 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -2411,12 +2411,14 @@ static int
axgbe_dev_close(struct rte_eth_dev *eth_dev) {
struct rte_pci_device *pci_dev;
+ struct axgbe_port *pdata;
PMD_INIT_FUNC_TRACE();
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
+ pdata = eth_dev->data->dev_private;
pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
axgbe_dev_clear_queues(eth_dev);
@@ -2426,6 +2428,9 @@ axgbe_dev_close(struct rte_eth_dev *eth_dev)
axgbe_dev_interrupt_handler,
(void *)eth_dev);
+ /* Disable all interrupts in the hardware */
+ XP_IOWRITE(pdata, XP_INT_EN, 0x0);
+
return 0;
}
--
2.34.1
More information about the dev
mailing list