linux/drivers/pci
Mario Limonciello 907a7a2e5b PCI/PM: Set up runtime PM even for devices without PCI PM
4d4c10f763 ("PCI: Explicitly put devices into D0 when initializing")
intended to put PCI devices into D0, but in doing so unintentionally
changed runtime PM initialization not to occur on devices that don't
support PCI PM.  This caused a regression in vfio-pci due to an imbalance
with its use.

Adjust the logic in pci_pm_init() so that even if PCI PM isn't supported
runtime PM is still initialized.

Fixes: 4d4c10f763 ("PCI: Explicitly put devices into D0 when initializing")
Reported-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Closes: https://lore.kernel.org/linux-pci/20250424043232.1848107-1-superm1@kernel.org/T/#m7e8929d6421690dc8bd6dc639d86c2b4db27cbc4
Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Closes: https://lore.kernel.org/linux-pci/20250424043232.1848107-1-superm1@kernel.org/T/#m40d277dcdb9be64a1609a82412d1aa906263e201
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Link: https://patch.msgid.link/20250611233117.61810-1-superm1@kernel.org
2025-06-13 14:38:45 -05:00
..
controller pci-v6.16-changes 2025-06-04 11:26:17 -07:00
endpoint PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding 2025-05-28 16:47:56 -05:00
hotplug treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
msi PCI/MSI: Size device MSI domain with the maximum number of vectors 2025-06-04 11:19:25 +02:00
pcie Merge branch 'pci/ptm-debugfs' 2025-06-04 10:50:44 -05:00
pwrctrl PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module 2025-05-23 15:22:42 -05:00
switch PCI: switchtec: Add Microchip PCI100X device IDs 2025-01-21 10:47:28 -06:00
access.c PCI: Revert the cfg_access_lock lockdep mechanism 2024-06-04 12:10:05 -05:00
ats.c iommufd: Extend IOMMU_GET_HW_INFO to report PASID capability 2025-03-28 10:07:23 -03:00
bus.c PCI: Limit visibility of match_driver flag to PCI core 2025-05-15 13:40:52 +00:00
devres.c PCI: Remove redundant set of request functions 2025-05-20 07:39:15 +00:00
doe.c PCI/DOE: Expose DOE features via sysfs 2025-03-21 16:36:01 -05:00
ecam.c PCI: ecam: Allow cfg->priv to be pre-populated from the root port device 2025-04-23 12:52:47 +05:30
host-bridge.c
iomap.c PCI: Remove hybrid-devres usage warnings from kernel-doc 2025-05-20 07:39:16 +00:00
iov.c PCI: Fix NULL dereference in SR-IOV VF creation error path 2025-03-21 14:54:16 -05:00
irq.c PCI: Place interrupt related code into irq.c 2024-01-29 17:01:31 -06:00
Kconfig PCI: Add CONFIG_MMU dependency 2025-04-23 15:40:30 -05:00
Makefile Merge branch 'pci/tph' 2024-11-25 13:40:55 -06:00
mmap.c PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y 2024-03-05 16:08:43 -06:00
npem.c PCI/NPEM: Add _DSM PCIe SSD status LED management 2024-09-06 11:37:24 -05:00
of_property.c PCI: of: Create device tree PCI host bridge node 2025-02-28 15:13:51 -06:00
of.c PCI: of: Add of_pci_get_equalization_presets() API 2025-04-19 19:42:33 +05:30
p2pdma.c PCI/P2PDMA: Refactor the p2pdma mapping helpers 2025-05-06 08:36:53 +02:00
pci-acpi.c PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root() 2025-05-22 11:00:03 +00:00
pci-bridge-emul.c PCI: Rename CRS Completion Status to RRS 2024-09-10 19:52:30 -05:00
pci-bridge-emul.h
pci-driver.c Merge branch 'pci/pm' 2025-06-04 10:50:01 -05:00
pci-label.c
pci-mid.c PCI/PM: Switch to new Intel CPU model defines 2024-06-11 17:08:14 -05:00
pci-pf-stub.c PCI: Add missing MODULE_DESCRIPTION() macros 2024-07-08 08:35:35 +00:00
pci-stub.c PCI: Add missing MODULE_DESCRIPTION() macros 2024-07-08 08:35:35 +00:00
pci-sysfs.c Merge branch 'pci/pm' 2025-06-04 10:50:01 -05:00
pci.c PCI/PM: Set up runtime PM even for devices without PCI PM 2025-06-13 14:38:45 -05:00
pci.h pci-v6.16-changes 2025-06-04 11:26:17 -07:00
probe.c PCI: Limit visibility of match_driver flag to PCI core 2025-05-15 13:40:52 +00:00
proc.c s390/pci: Introduce pdev->non_mappable_bars and replace VFIO_PCI_MMAP 2025-03-21 14:54:16 -05:00
quirks.c pci-v6.16-changes 2025-06-04 11:26:17 -07:00
remove.c Merge branch 'pci/devtree-create' 2025-03-27 13:14:45 -05:00
rom.c
search.c
setup-bus.c pci-v6.16-changes 2025-06-04 11:26:17 -07:00
setup-res.c PCI: Do not claim to release resource falsely 2025-03-07 11:26:19 -06:00
slot.c PCI: hotplug: Inline pci_hp_{create,remove}_module_link() 2025-03-04 17:00:12 -06:00
syscall.c
tph.c PCI/TPH: Replace the broken MSI-X control word update 2025-04-09 20:47:30 +02:00
vc.c
vgaarb.c
vpd.c PCI/VPD: Constify 'struct bin_attribute' 2024-12-03 15:25:41 -06:00
xen-pcifront.c