android_kernel_oneplus_msm8998/drivers/pci
Sumit Semwal 4110080574 PCI: Do any VF BAR updates before enabling the BARs
From: Gavin Shan <gwshan@linux.vnet.ibm.com>

[ Upstream commit f40ec3c748c6912f6266c56a7f7992de61b255ed ]

Previously we enabled VFs and enable their memory space before calling
pcibios_sriov_enable().  But pcibios_sriov_enable() may update the VF BARs:
for example, on PPC PowerNV we may change them to manage the association of
VFs to PEs.

Because 64-bit BARs cannot be updated atomically, it's unsafe to update
them while they're enabled.  The half-updated state may conflict with other
devices in the system.

Call pcibios_sriov_enable() before enabling the VFs so any BAR updates
happen while the VF BARs are disabled.

[bhelgaas: changelog]
Tested-by: Carol Soto <clsoto@us.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30 09:35:20 +02:00
..
host PCI: keystone: Fix MSI code that retrieves struct pcie_port pointer 2016-03-09 15:34:49 -08:00
hotplug powerpc/pci/rpadlpar: Fix device reference leaks 2017-01-12 11:22:50 +01:00
pcie PCI/ASPM: Handle PCI-to-PCIe bridges as roots of PCIe hierarchies 2017-02-09 08:02:44 +01:00
access.c PCI: Use function 0 VPD for identical functions, regular VPD for others 2015-09-24 17:06:32 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Fix minimum allocation address overwrite 2016-02-17 12:30:56 -08:00
host-bridge.c Merge branch 'pci/misc' into next 2015-04-10 08:27:18 -05:00
hotplug-pci.c
htirq.c x86/htirq: Use hierarchical irqdomain to manage Hypertransport interrupts 2015-04-24 15:36:50 +02:00
iov.c PCI: Do any VF BAR updates before enabling the BARs 2017-03-30 09:35:20 +02:00
irq.c
Kconfig PCI,parisc: Enable 64-bit bus addresses on PA-RISC 2015-09-08 15:30:47 +02:00
Makefile PCI: Build setup-irq.o for arm64 2015-08-20 12:02:49 -05:00
msi.c genirq/msi: Make sure PCI MSIs are activated early 2016-09-07 08:32:38 +02:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c PCI / ACPI: Fix pci_acpi_optimize_delay() comment 2015-07-15 15:11:50 -05:00
pci-driver.c PCI / PM: Tune down retryable runtime suspend error messages 2015-12-02 15:24:21 +01:00
pci-label.c
pci-stub.c
pci-sysfs.c PCI: Support PCIe devices with short cfg_size 2016-09-07 08:32:37 +02:00
pci.c PCI: Ignore BAR updates on virtual functions 2017-03-30 09:35:20 +02:00
pci.h PCI: Remove pci_resource_bar() and pci_iov_resource_bar() 2017-03-30 09:35:19 +02:00
probe.c PCI: Decouple IORESOURCE_ROM_ENABLE and PCI_ROM_ADDRESS_ENABLE 2017-03-30 09:35:19 +02:00
proc.c
quirks.c PCI: Mark Atheros AR9580 to avoid bus reset 2016-10-28 03:01:26 -04:00
remove.c PCI: Embed ATS info directly into struct pci_dev 2015-08-13 15:57:21 -05:00
rom.c PCI: Add comments about ROM BAR updating 2017-03-30 09:35:19 +02:00
search.c
setup-bus.c PCI: Handle IORESOURCE_PCI_FIXED when assigning resources 2015-10-29 17:35:39 -05:00
setup-irq.c
setup-res.c PCI: Ignore BAR updates on virtual functions 2017-03-30 09:35:20 +02:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c
vc.c PCI: Use dev->has_secondary_link to find downstream PCIe links 2015-05-29 15:35:26 -05:00
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-03-03 15:07:30 -08:00