net/enic: unregister interrupt handler when stopping
authorNelson Escobar <neescoba@cisco.com>
Mon, 19 Sep 2016 18:50:09 +0000 (11:50 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 30 Sep 2016 10:27:18 +0000 (12:27 +0200)
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 <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_main.c

index eb32ac1..aafdc64 100644 (file)
@@ -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);