提交 c763e7b5 编写于 作者: D Dexuan Cui 提交者: Jesse Barnes

PCI: add Intel 82599 Virtual Function specific reset method

Handle device specific timeout and use FLR.
Signed-off-by: NYu Zhao <yu.zhao@intel.com>
Signed-off-by: NDexuan Cui <dexuan.cui@intel.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 aeb30016
......@@ -2664,7 +2664,29 @@ static int reset_intel_generic_dev(struct pci_dev *dev, int probe)
}
}
static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe)
{
int pos;
pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
if (!pos)
return -ENOTTY;
if (probe)
return 0;
pci_write_config_word(dev, pos + PCI_EXP_DEVCTL,
PCI_EXP_DEVCTL_BCR_FLR);
msleep(100);
return 0;
}
#define PCI_DEVICE_ID_INTEL_82599_SFP_VF 0x10ed
struct pci_dev_reset_methods pci_dev_reset_methods[] = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82599_SFP_VF,
reset_intel_82599_sfp_virtfn },
{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
reset_intel_generic_dev },
{ 0 }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册