diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-14 21:11:26 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-20 08:53:52 -0500 |
commit | c8d8096abc84b544dd4f37f12e929d5f8aadd160 (patch) | |
tree | 0cca5b21d355924936d8302beca9c8c35eabbe50 /drivers | |
parent | a60a2b73ba69abca26653fff157b0fd8947bc498 (diff) | |
download | lwn-c8d8096abc84b544dd4f37f12e929d5f8aadd160.tar.gz lwn-c8d8096abc84b544dd4f37f12e929d5f8aadd160.zip |
PCI: Call pcie_flr() from reset_intel_82599_sfp_virtfn()
The 82599 quirk contained an outdated copy of the FLR code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/quirks.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 823271b13d12..fd5ec86816aa 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3641,19 +3641,11 @@ static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, int probe) * * The 82599 supports FLR on VFs, but FLR support is reported only * in the PF DEVCAP (sec 9.3.10.4), not in the VF DEVCAP (sec 9.5). - * Therefore, we can't use pcie_flr(), which checks the VF DEVCAP. + * Thus we must call pcie_flr() directly without first checking if it is + * supported. */ - - if (probe) - return 0; - - if (!pci_wait_for_pending_transaction(dev)) - dev_err(&dev->dev, "transaction is not cleared; proceeding with reset anyway\n"); - - pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); - - msleep(100); - + if (!probe) + pcie_flr(dev); return 0; } |