From 667b8a3bd497d738471d301f5b2f50065f4c8a02 Mon Sep 17 00:00:00 2001 From: Nelson Escobar Date: Mon, 19 Sep 2016 11:50:09 -0700 Subject: [PATCH] net/enic: unregister interrupt handler when stopping enic_disable() wasn't calling rte_intr_disable() or rte_intr_callback_unregister(). stopping/starting a port would result in the same interrupt callback being registered multiple times, which would then cause it to be called multiple times on every interrupt. Fixes: fefed3d1e62c ("enic: new driver") Signed-off-by: Nelson Escobar Reviewed-by: John Daley --- drivers/net/enic/enic_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index eb32ac1ace..aafdc64fe6 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -797,6 +797,10 @@ int enic_disable(struct enic *enic) vnic_intr_mask(&enic->intr); (void)vnic_intr_masked(&enic->intr); /* flush write */ + rte_intr_disable(&enic->pdev->intr_handle); + rte_intr_callback_unregister(&enic->pdev->intr_handle, + enic_intr_handler, + (void *)enic->rte_dev); vnic_dev_disable(enic->vdev); -- 2.20.1