From: Shahed Shaikh Date: Tue, 24 Jul 2018 22:18:41 +0000 (-0700) Subject: net/qede: fix interrupt handler unregister X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4eee1bbf25859b72723ec570d77bf5fb501bedcf;p=dpdk.git net/qede: fix interrupt handler unregister Commit 023d7a0449f11 ("net/qede: fix legacy interrupt mode") added a handler for legacy interrupt mode but forgot to unregister same handler in rte_intr_callback_unregister() Fixes: 245aec289338 ("net/qede: fix legacy interrupt mode") Cc: stable@dpdk.org Signed-off-by: Shahed Shaikh --- diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 3a57a42d92..88c805c460 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -1729,8 +1729,20 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev) qdev->ops->common->slowpath_stop(edev); qdev->ops->common->remove(edev); rte_intr_disable(&pci_dev->intr_handle); - rte_intr_callback_unregister(&pci_dev->intr_handle, - qede_interrupt_handler, (void *)eth_dev); + + switch (pci_dev->intr_handle.type) { + case RTE_INTR_HANDLE_UIO_INTX: + case RTE_INTR_HANDLE_VFIO_LEGACY: + rte_intr_callback_unregister(&pci_dev->intr_handle, + qede_interrupt_handler_intx, + (void *)eth_dev); + break; + default: + rte_intr_callback_unregister(&pci_dev->intr_handle, + qede_interrupt_handler, + (void *)eth_dev); + } + if (ECORE_IS_CMT(edev)) rte_eal_alarm_cancel(qede_poll_sp_sb_cb, (void *)eth_dev); }