diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2009-12-07 00:03:23 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-12-16 16:37:52 -0500 |
commit | c763e7b58f71833e6cb7b05493eb1adda4811b08 (patch) | |
tree | 0fb92e114a0762da1d3f910506bf9c6e2bf6328b /drivers | |
parent | aeb30016fec3378c543cae33654c2144277fe674 (diff) |
PCI: add Intel 82599 Virtual Function specific reset method
Handle device specific timeout and use FLR.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index cf96776d4bbf..8726698866b1 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -2664,7 +2664,29 @@ static int reset_intel_generic_dev(struct pci_dev *dev, int probe) | |||
2664 | } | 2664 | } |
2665 | } | 2665 | } |
2666 | 2666 | ||
2667 | static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe) | ||
2668 | { | ||
2669 | int pos; | ||
2670 | |||
2671 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | ||
2672 | if (!pos) | ||
2673 | return -ENOTTY; | ||
2674 | |||
2675 | if (probe) | ||
2676 | return 0; | ||
2677 | |||
2678 | pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, | ||
2679 | PCI_EXP_DEVCTL_BCR_FLR); | ||
2680 | msleep(100); | ||
2681 | |||
2682 | return 0; | ||
2683 | } | ||
2684 | |||
2685 | #define PCI_DEVICE_ID_INTEL_82599_SFP_VF 0x10ed | ||
2686 | |||
2667 | struct pci_dev_reset_methods pci_dev_reset_methods[] = { | 2687 | struct pci_dev_reset_methods pci_dev_reset_methods[] = { |
2688 | { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82599_SFP_VF, | ||
2689 | reset_intel_82599_sfp_virtfn }, | ||
2668 | { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, | 2690 | { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, |
2669 | reset_intel_generic_dev }, | 2691 | reset_intel_generic_dev }, |
2670 | { 0 } | 2692 | { 0 } |