linux_dsm_epyc7002/drivers/pci
Chiqijun 077cb8946f PCI: Work around Huawei Intelligent NIC VF FLR erratum
commit ce00322c2365e1f7b0312f2f493539c833465d97 upstream.

pcie_flr() starts a Function Level Reset (FLR), waits 100ms (the maximum
time allowed for FLR completion by PCIe r5.0, sec 6.6.2), and waits for the
FLR to complete.  It assumes the FLR is complete when a config read returns
valid data.

When we do an FLR on several Huawei Intelligent NIC VFs at the same time,
firmware on the NIC processes them serially.  The VF may respond to config
reads before the firmware has completed its reset processing.  If we bind a
driver to the VF (e.g., by assigning the VF to a virtual machine) in the
interval between the successful config read and completion of the firmware
reset processing, the NIC VF driver may fail to load.

Prevent this driver failure by waiting for the NIC firmware to complete its
reset processing.  Not all NIC firmware supports this feature.

[bhelgaas: commit log]
Link: https://support.huawei.com/enterprise/en/doc/EDOC1100063073/87950645/vm-oss-occasionally-fail-to-load-the-in200-driver-when-the-vf-performs-flr
Link: https://lore.kernel.org/r/20210414132301.1793-1-chiqijun@huawei.com
Signed-off-by: Chiqijun <chiqijun@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-23 14:42:51 +02:00
..
controller PCI: aardvark: Fix kernel panic during PIO transfer 2021-06-23 14:42:51 +02:00
endpoint PCI: endpoint: Fix missing destroy_workqueue() 2021-05-19 10:13:02 +02:00
hotplug ACPI / hotplug / PCI: Fix reference count leak in enable_slot() 2021-05-22 11:40:52 +02:00
pcie PCI/LINK: Remove bandwidth notification 2021-03-17 17:06:24 +01:00
switch PCI: switchtec: Add missing __iomem tag to fix sparse warnings 2020-07-31 11:23:45 -05:00
access.c Merge branch 'pci/misc' 2020-08-05 18:24:16 -05:00
ats.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
bus.c PCI: Add device even if driver attach failed 2020-07-07 17:33:41 -05:00
ecam.c PCI/ACPI: Add Ampere Altra SOC MCFG quirk 2020-09-17 12:27:43 -05:00
host-bridge.c
iov.c PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY 2020-09-21 14:42:11 -06:00
irq.c PCI: Remove unused pci_lost_interrupt() 2020-07-29 14:25:18 -05:00
Kconfig pci-v5.10-changes 2020-10-22 12:41:00 -07:00
Makefile PCI: Allow building PCIe things without PCIEPORTBUS 2019-11-21 07:52:33 -06:00
mmap.c
msi.c PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable 2020-09-16 16:52:37 +02:00
of.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
p2pdma.c pci-v5.10-changes 2020-10-22 12:41:00 -07:00
pci-acpi.c PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() 2020-12-30 11:54:05 +01:00
pci-bridge-emul.c PCI: pci-bridge-emul: Fix array overruns, improve safety 2021-03-04 11:38:15 +01:00
pci-bridge-emul.h
pci-driver.c pci-v5.10-changes 2020-10-22 12:41:00 -07:00
pci-label.c PCI: Replace http:// links with https:// 2020-06-30 13:05:09 -05:00
pci-mid.c PCI: intel-mid: Convert to new X86 CPU match macros 2020-03-24 21:35:06 +01:00
pci-pf-stub.c PCI/IOV: Simplify pci-pf-stub with module_pci_driver() 2020-09-17 12:40:20 -05:00
pci-stub.c
pci-sysfs.c Merge branch 'pci/misc' 2020-10-21 09:58:36 -05:00
pci.c PCI: PM: Do not read power state in pci_enable_device_flags() 2021-05-11 14:47:18 +02:00
pci.h PCI: thunder: Fix compile testing 2021-05-22 11:40:52 +02:00
probe.c PCI: Release OF node in pci_scan_device()'s error path 2021-05-19 10:13:01 +02:00
proc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
quirks.c PCI: Work around Huawei Intelligent NIC VF FLR erratum 2021-06-23 14:42:51 +02:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2020-05-14 16:36:35 -05:00
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-03-30 09:52:23 -05:00
search.c Merge branch 'pci/host-vmd' 2020-01-29 17:00:02 -06:00
setup-bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
setup-irq.c
setup-res.c PCI: Decline to resize resources if boot config must be preserved 2021-03-04 11:37:18 +01:00
slot.c PCI: Fix pci_slot_release() NULL pointer dereference 2020-12-30 11:54:28 +01:00
syscall.c PCI: Align checking of syscall user config accessors 2021-03-04 11:38:12 +01:00
vc.c PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
vpd.c PCI: Allow VPD access for QLogic ISP2722 2021-05-14 09:49:57 +02:00
xen-pcifront.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00