aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/iov.c
diff options
context:
space:
mode:
authorYu Zhao <yu.zhao@intel.com>2009-06-13 03:52:13 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-16 17:30:15 -0400
commit8c1c699fec9e9021bf6ff0285dee086bb27aec90 (patch)
tree4af7bd96c1b651633ff7b6721959aeacd120e4ee /drivers/pci/iov.c
parentc465def6bfe834b62623caa9b98f2d4f4739875a (diff)
PCI: cleanup Function Level Reset
This patch enhances the FLR functions: 1) remove disable_irq() so the shared IRQ won't be disabled. 2) replace the 1s wait with 100, 200 and 400ms wait intervals for the Pending Transaction. 3) replace mdelay() with msleep(). 4) add might_sleep(). 5) lock the device to prevent PM suspend from accessing the CSRs during the reset. 6) coding style fixes. Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r--drivers/pci/iov.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index e87fe95da814..03c7706c0a09 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -110,7 +110,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset)
110 } 110 }
111 111
112 if (reset) 112 if (reset)
113 pci_execute_reset_function(virtfn); 113 __pci_reset_function(virtfn);
114 114
115 pci_device_add(virtfn, virtfn->bus); 115 pci_device_add(virtfn, virtfn->bus);
116 mutex_unlock(&iov->dev->sriov->lock); 116 mutex_unlock(&iov->dev->sriov->lock);
@@ -164,7 +164,7 @@ static void virtfn_remove(struct pci_dev *dev, int id, int reset)
164 164
165 if (reset) { 165 if (reset) {
166 device_release_driver(&virtfn->dev); 166 device_release_driver(&virtfn->dev);
167 pci_execute_reset_function(virtfn); 167 __pci_reset_function(virtfn);
168 } 168 }
169 169
170 sprintf(buf, "virtfn%u", id); 170 sprintf(buf, "virtfn%u", id);