aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf/i40evf_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40evf_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index d962164dfb0f..99d2cffae0cd 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2476,6 +2476,12 @@ static int i40evf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2476 hw->bus.device = PCI_SLOT(pdev->devfn); 2476 hw->bus.device = PCI_SLOT(pdev->devfn);
2477 hw->bus.func = PCI_FUNC(pdev->devfn); 2477 hw->bus.func = PCI_FUNC(pdev->devfn);
2478 2478
2479 /* set up the locks for the AQ, do this only once in probe
2480 * and destroy them only once in remove
2481 */
2482 mutex_init(&hw->aq.asq_mutex);
2483 mutex_init(&hw->aq.arq_mutex);
2484
2479 INIT_LIST_HEAD(&adapter->mac_filter_list); 2485 INIT_LIST_HEAD(&adapter->mac_filter_list);
2480 INIT_LIST_HEAD(&adapter->vlan_filter_list); 2486 INIT_LIST_HEAD(&adapter->vlan_filter_list);
2481 2487
@@ -2629,6 +2635,10 @@ static void i40evf_remove(struct pci_dev *pdev)
2629 if (hw->aq.asq.count) 2635 if (hw->aq.asq.count)
2630 i40evf_shutdown_adminq(hw); 2636 i40evf_shutdown_adminq(hw);
2631 2637
2638 /* destroy the locks only once, here */
2639 mutex_destroy(&hw->aq.arq_mutex);
2640 mutex_destroy(&hw->aq.asq_mutex);
2641
2632 iounmap(hw->hw_addr); 2642 iounmap(hw->hw_addr);
2633 pci_release_regions(pdev); 2643 pci_release_regions(pdev);
2634 2644