schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000));
}
+static void be_msix_disable(struct be_adapter *adapter)
+{
+ if (adapter->msix_enabled) {
+ pci_disable_msix(adapter->pdev);
+ adapter->msix_enabled = false;
+ }
+}
+
static void be_msix_enable(struct be_adapter *adapter)
{
int i, status;
static void __devexit be_remove(struct pci_dev *pdev)
{
struct be_adapter *adapter = pci_get_drvdata(pdev);
+
if (!adapter)
return;
be_ctrl_cleanup(adapter);
- if (adapter->msix_enabled) {
- pci_disable_msix(adapter->pdev);
- adapter->msix_enabled = false;
- }
+ be_msix_disable(adapter);
pci_set_drvdata(pdev, NULL);
pci_release_regions(pdev);
ctrl_clean:
be_ctrl_cleanup(adapter);
free_netdev:
+ be_msix_disable(adapter);
free_netdev(adapter->netdev);
+ pci_set_drvdata(pdev, NULL);
rel_reg:
pci_release_regions(pdev);
disable_dev: