[AMD Official Use Only - AMD Internal Distribution Only] Acked-by: Selwin Sebastian<selwin.sebast...@amd.com>
-----Original Message----- From: Ande, Venkat Kumar <venkatkumar.a...@amd.com> Sent: Tuesday, May 7, 2024 6:13 PM To: dev@dpdk.org Cc: Sebastian, Selwin <selwin.sebast...@amd.com>; Ande, Venkat Kumar <venkatkumar.a...@amd.com>; sta...@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: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande <venkatkumar.a...@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