bnxt_en: Free MSIX vectors when unregistering the device from bnxt_re.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 23 Aug 2017 23:34:04 +0000 (19:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Aug 2017 05:42:42 +0000 (22:42 -0700)
Take back ownership of the MSIX vectors when unregistering the device
from bnxt_re.

Fixes: a588e4580a7e ("bnxt_en: Add interface to support RDMA driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c

index 77da75a55c0200edf5229d1dd88939473f85194c..997e10e8b863cc74387016d9de9fbe9bbba5b9b3 100644 (file)
@@ -84,6 +84,8 @@ static int bnxt_unregister_dev(struct bnxt_en_dev *edev, int ulp_id)
 
                max_stat_ctxs = bnxt_get_max_func_stat_ctxs(bp);
                bnxt_set_max_func_stat_ctxs(bp, max_stat_ctxs + 1);
+               if (ulp->msix_requested)
+                       edev->en_ops->bnxt_free_msix(edev, ulp_id);
        }
        if (ulp->max_async_event_id)
                bnxt_hwrm_func_rgtr_async_events(bp, NULL, 0);