Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315731
b: refs/heads/master
c: d773d13
h: refs/heads/master
i:
  315729: bc76c94
  315727: 0b6ca16
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 20, 2012
1 parent fc230f4 commit 7a0d838
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d9c0bfd0f0470c8fb0033999f623d4eec7b1a2c
refs/heads/master: d773d1310625be3b040b436178ad59a0af8888f1
15 changes: 11 additions & 4 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ void ixgbe_disable_sriov(struct ixgbe_adapter *adapter)
u32 vmdctl;
int i;

/* set num VFs to 0 to prevent access to vfinfo */
adapter->num_vfs = 0;

/* free VF control structures */
kfree(adapter->vfinfo);
adapter->vfinfo = NULL;

/* free macvlan list */
kfree(adapter->mv_list);
adapter->mv_list = NULL;

#ifdef CONFIG_PCI_IOV
/* disable iov and allow time for transactions to clear */
pci_disable_sriov(adapter->pdev);
Expand Down Expand Up @@ -238,11 +249,7 @@ void ixgbe_disable_sriov(struct ixgbe_adapter *adapter)
if (adapter->vfinfo[i].vfdev)
pci_dev_put(adapter->vfinfo[i].vfdev);
}
kfree(adapter->vfinfo);
kfree(adapter->mv_list);
adapter->vfinfo = NULL;

adapter->num_vfs = 0;
adapter->flags &= ~IXGBE_FLAG_SRIOV_ENABLED;
}

Expand Down

0 comments on commit 7a0d838

Please sign in to comment.