summaryrefslogtreecommitdiff
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2023-08-03 20:12:32 +0300
committerBjorn Helgaas <bhelgaas@google.com>2023-08-11 22:19:16 +0300
commit5cd903bce9ddd234d76e67d0dfaf0aab0f11a2e0 (patch)
tree8d06b36ad0eba807888e253162b8f79f7b100f51 /drivers/pci/pci.c
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
downloadlinux-5cd903bce9ddd234d76e67d0dfaf0aab0f11a2e0.tar.xz
PCI/VPD: Add runtime power management to sysfs interface
Unlike default access to config space through sysfs, the VPD read and write functions don't actively manage the runtime power management state of the device during access. Since commit 7ab5e10eda02 ("vfio/pci: Move the unused device into low power state with runtime PM"), the vfio-pci driver will use runtime power management and release unused devices to make use of low power states. Attempting to access VPD information in D3cold can result in incorrect information or kernel crashes depending on the system behavior. Wrap the VPD read/write bin attribute handlers in runtime PM and take into account the potential quirk to select the correct device to wake. Link: https://lore.kernel.org/r/20230803171233.3810944-2-alex.williamson@redhat.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com> [bhelgaas: tweak pci_dev_put() test to match the pci_get_func0_dev() test] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci.c')
0 files changed, 0 insertions, 0 deletions