diff options
author | Gavin Shan | 2017-08-11 10:19:33 +0200 |
---|---|---|
committer | Bjorn Helgaas | 2017-08-30 00:24:02 +0200 |
commit | 0fc690a7c3f7053613dcbab6a7613bb6586d8ee2 (patch) | |
tree | 6feba454ea92df74db6a46c1a6cbad340622e6ce /arch/tile/kernel/pci.c | |
parent | PCI: Add ACS quirk for APM X-Gene devices (diff) | |
download | kernel-qcow2-linux-0fc690a7c3f7053613dcbab6a7613bb6586d8ee2.tar.gz kernel-qcow2-linux-0fc690a7c3f7053613dcbab6a7613bb6586d8ee2.tar.xz kernel-qcow2-linux-0fc690a7c3f7053613dcbab6a7613bb6586d8ee2.zip |
PCI: Disable VF decoding before pcibios_sriov_disable() updates resources
A struct resource represents the address space consumed by a device. We
should not modify that resource while the device is actively using the
address space. For VFs, pci_iov_update_resource() enforces this by
printing a warning and doing nothing if the VFE (VF Enable) and MSE (VF
Memory Space Enable) bits are set.
Previously, both sriov_enable() and sriov_disable() called the
pcibios_sriov_disable() arch hook, which may update the struct resource,
while VFE and MSE were enabled. This effectively dropped the resource
update pcibios_sriov_disable() intended to do.
Disable VF memory decoding before calling pcibios_sriov_disable().
Reported-by: Carol L Soto <clsoto@us.ibm.com>
Tested-by: Carol L Soto <clsoto@us.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: shan.gavin@gmail.com
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/tile/kernel/pci.c')
0 files changed, 0 insertions, 0 deletions