Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294710
b: refs/heads/master
c: ac205b7
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Feb 14, 2012
1 parent 72a29e9 commit 0fc263e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 67cc7e26a5c46508ee00b9fe169aad833b798025
refs/heads/master: ac205b7bb72fa4227d2e79979bbe2b4687cdf44d
10 changes: 9 additions & 1 deletion trunk/drivers/pci/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,15 @@ static void pci_stop_bus_devices(struct pci_bus *bus)
{
struct list_head *l, *n;

list_for_each_safe(l, n, &bus->devices) {
/*
* VFs could be removed by pci_remove_bus_device() in the
* pci_stop_bus_devices() code path for PF.
* aka, bus->devices get updated in the process.
* but VFs are inserted after PFs when SRIOV is enabled for PF,
* We can iterate the list backwards to get prev valid PF instead
* of removed VF.
*/
list_for_each_prev_safe(l, n, &bus->devices) {
struct pci_dev *dev = pci_dev_b(l);
pci_stop_bus_device(dev);
}
Expand Down

0 comments on commit 0fc263e

Please sign in to comment.