PCI: cleanup Function Level Reset
authorYu Zhao <yu.zhao@intel.com>
Sat, 13 Jun 2009 07:52:13 +0000 (15:52 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 16 Jun 2009 21:30:15 +0000 (14:30 -0700)
commit8c1c699fec9e9021bf6ff0285dee086bb27aec90
tree4af7bd96c1b651633ff7b6721959aeacd120e4ee
parentc465def6bfe834b62623caa9b98f2d4f4739875a
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>
drivers/pci/iov.c
drivers/pci/pci.c
include/linux/pci.h