linux/drivers
Alex Williamson a4f12e5cba PCI: Fix active state requirement in PME polling
[ Upstream commit 41044d5360 ]

The commit noted in fixes added a bogus requirement that runtime PM managed
devices need to be in the RPM_ACTIVE state for PME polling.  In fact, only
devices in low power states should be polled.

However there's still a requirement that the device config space must be
accessible, which has implications for both the current state of the polled
device and the parent bridge, when present.  It's not sufficient to assume
the bridge remains in D0 and cases have been observed where the bridge
passes the D0 test, but the PM state indicates RPM_SUSPENDING and config
space of the polled device becomes inaccessible during pci_pme_wakeup().

Therefore, since the bridge is already effectively required to be in the
RPM_ACTIVE state, formalize this in the code and elevate the PM usage count
to maintain the state while polling the subordinate device.

This resolves a regression reported in the bugzilla below where a
Thunderbolt/USB4 hierarchy fails to scan for an attached NVMe endpoint
downstream of a bridge in a D3hot power state.

Link: https://lore.kernel.org/r/20240123185548.1040096-1-alex.williamson@redhat.com
Fixes: d3fcd73603 ("PCI: Fix runtime PM race with PME polling")
Reported-by: Sanath S <sanath.s@amd.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218360
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Sanath S <sanath.s@amd.com>
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-02-23 09:51:33 +01:00
..
accel accel/habanalabs/gaudi2: fix undef opcode reporting 2024-02-05 20:17:01 +00:00
accessibility accessibility: speakup: refactor deprecated strncpy 2023-10-05 13:34:05 +02:00
acpi ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CGA 2024-02-05 20:17:03 +00:00
amba amba: bus: balance firmware node reference counting 2023-10-17 13:37:35 -05:00
android binder: fix race between mmput() and do_exit() 2024-01-25 15:45:09 -08:00
ata SCSI fixes on 20231130 2023-12-02 06:27:20 +09:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-02-16 19:14:21 +01:00
auxdisplay auxdisplay: panel: Replace deprecated strncpy() with strtomem_pad() 2023-09-29 14:48:31 -07:00
base driver core: fw_devlink: Improve detection of overlapping cycles 2024-02-23 09:51:32 +01:00
bcma bcma: Add explicit of_device.h include 2023-04-14 15:32:56 +03:00
block block/rnbd-srv: Check for unlikely string overflow 2024-02-05 20:16:53 +00:00
bluetooth Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 2024-02-05 20:16:55 +00:00
bus bus: mhi: host: Add spinlock to protect WP access when queueing TREs 2024-01-31 16:20:56 -08:00
cache riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT 2023-10-26 09:42:37 +02:00
cdrom cdrom: Remove now superfluous sentinel element from ctl_table array 2023-10-02 20:04:58 -06:00
cdx cdx: Unlock on error path in rescan_store() 2024-01-25 15:45:25 -08:00
char hwrng: starfive - Fix dev_err_probe return error 2024-02-05 20:16:46 +00:00
clk clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks 2024-02-05 20:17:01 +00:00
clocksource clocksource/drivers/ep93xx: Fix error handling during probe 2024-01-25 15:45:10 -08:00
comedi comedi: add HAS_IOPORT dependencies again 2023-10-05 13:34:05 +02:00
connector connector: Fix proc_event_num_listeners count not cleared 2024-01-02 14:13:48 +00:00
counter First set of Counter fixes for 6.6 2023-10-02 13:13:15 +02:00
cpufreq cpufreq/amd-pstate: Fix setting scaling max/min freq values 2024-01-31 16:21:20 -08:00
cpuidle cpuidle: haltpoll: Do not enable interrupts when entering idle 2024-01-25 15:44:40 -08:00
crypto crypto: caam - fix asynchronous hash 2024-02-05 20:17:07 +00:00
cxl cxl/region:Fix overflow issue in alloc_hpa() 2024-01-31 16:21:20 -08:00
dax Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
dca Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
devfreq PM / devfreq: Synchronize devfreq_monitor_[start/stop] 2024-02-05 20:16:46 +00:00
dio drivers: dio: fix possible memory leak in dio_init() 2022-11-09 15:12:37 +01:00
dma dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA 2024-02-16 19:14:17 +01:00
dma-buf dma-buf: fix check in dma_resv_add_fence 2023-11-27 20:00:47 +01:00
dpll dpll: fix possible deadlock during netlink dump operation 2024-02-23 09:51:24 +01:00
edac EDAC/thunderx: Fix possible out-of-bounds string access 2024-01-25 15:44:37 -08:00
eisa EISA: Replace all non-returning strlcpy with strscpy 2023-07-27 10:04:42 -07:00
extcon extcon: fix possible name leak in extcon_dev_register() 2024-02-05 20:17:04 +00:00
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-05 21:28:08 +09:00
firmware x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR 2024-02-16 19:14:19 +01:00
fpga Char/Misc and other driver changes for 6.7-rc1 2023-11-03 14:51:08 -10:00
fsi fsi: i2cr: Switch to use struct i2c_driver's .probe() 2023-08-22 15:51:33 +02:00
gnss driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
gpio gpio: eic-sprd: Clear interrupt after set the interrupt type 2024-01-31 16:21:19 -08:00
gpu nouveau: offload fence uevents work to workqueue 2024-02-23 09:51:29 +01:00
greybus greybus: gb-beagleplay: Remove use of pad bytes 2024-01-25 15:45:23 -08:00
hid HID: wacom: Do not register input devices until after hid_hw_start 2024-02-23 09:51:31 +01:00
hsi hsi: omap_ssi: Explicitly include correct DT includes 2023-07-31 23:17:57 +02:00
hte hte: Changes for v6.7-rc1 2023-10-31 18:32:51 -10:00
hv TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
hwmon hwmon: (coretemp) Fix bogus core_id to attr name mapping 2024-02-16 19:14:22 +01:00
hwspinlock hwspinlock: qcom: add missing regmap config for SFPB MMIO implementation 2023-07-17 11:49:18 -07:00
hwtracing coresight: etm4x: Fix width of CCITMIN field 2024-01-20 11:53:02 +01:00
i2c i2c: rk3x: Adjust mask/value offset for i2c2 on rv1126 2024-02-05 20:17:06 +00:00
i3c i3c: master: cdns: Update maximum prescaler value for i2c clock 2024-02-05 20:17:03 +00:00
idle x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram 2024-01-25 15:44:37 -08:00
iio iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP 2024-02-23 09:51:31 +01:00
infiniband IB/ipoib: Fix mcast list locking 2024-02-05 20:16:59 +00:00
input Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID 2024-02-16 19:14:29 +01:00
interconnect interconnect: qcom: sm8550: Enable sync_state 2024-02-23 09:51:32 +01:00
iommu iommu: Don't reserve 0-length IOVA region 2024-01-25 15:45:23 -08:00
ipack tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
irqchip - Flush the translation service tables to prevent unpredictable behavior 2023-11-19 13:49:32 -08:00
isdn hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
leds leds: trigger: panic: Don't register panic notifier if creating the trigger failed 2024-02-05 20:17:02 +00:00
macintosh powerpc updates for 6.7 2023-11-03 10:07:39 -10:00
mailbox mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt 2024-02-05 20:17:03 +00:00
mcb mcb: fix error handling for different scenarios when parsing 2023-10-21 23:04:02 +02:00
md dm-crypt, dm-verity: disable tasklets 2024-02-23 09:51:30 +01:00
media media: ir_toy: fix a memleak in irtoy_tx 2024-02-23 09:51:32 +01:00
memory IOMMU Updates for Linux v6.7 2023-11-09 13:37:28 -08:00
memstick memstick: jmb38x_ms: Annotate struct jmb38x_ms with __counted_by 2023-09-27 12:13:18 +02:00
message scsi: message: fusion: Initialize return value in mptfc_bus_reset() 2023-10-24 22:36:39 -04:00
mfd mfd: ti_am335x_tscadc: Fix TI SoC dependencies 2024-02-05 20:17:03 +00:00
misc misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback 2024-02-05 20:17:05 +00:00
mmc mmc: mmc_spi: remove custom DMA mapped buffers 2024-01-31 16:21:00 -08:00
most staging: most: Replace all non-returning strlcpy with strscpy 2023-06-01 07:07:37 -07:00
mtd mtd: rawnand: Clarify conditions to enable continuous reads 2024-01-31 16:20:55 -08:00
mux mux: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
net i40e: Fix waiting for queues of all VSIs to be disabled 2024-02-23 09:51:28 +01:00
nfc nfc: virtual_ncidev: Add variable to check if ndev is running 2023-11-22 10:55:48 +00:00
ntb ntb: Check tx descriptors outstanding instead of head/tail for tx queue 2023-08-22 12:38:19 -04:00
nubus nubus: Don't list slot resources by default 2023-05-22 13:51:56 +02:00
nvdimm libnvdimm: remove kernel-doc warnings: 2023-10-18 09:48:05 -07:00
nvme nvme-host: fix the updating of the firmware version 2024-02-16 19:14:27 +01:00
nvmem nvmem: brcm_nvram: store a copy of NVRAM content 2023-12-15 13:15:02 +01:00
of of: property: Improve finding the supplier of a remote-endpoint property 2024-02-23 09:51:25 +01:00
opp OPP: The level field is always of unsigned int type 2024-02-05 20:16:46 +00:00
parisc parisc/power: Fix power soft-off button emulation on qemu 2024-01-31 16:20:56 -08:00
parport parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-20 11:53:02 +01:00
pci PCI: Fix active state requirement in PME polling 2024-02-23 09:51:33 +01:00
pcmcia PCMCIA odd cleanups and fixes for v6.7-rc1 2023-11-07 16:40:42 -08:00
peci Update peci-next for v6.6-rc1 2023-08-08 10:53:30 +02:00
perf perf: CXL: fix mismatched cpmu event opcode 2024-02-23 09:51:25 +01:00
phy phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP 2024-02-16 19:14:18 +01:00
pinctrl pinctrl: baytrail: Fix types of config value in byt_pin_config_set() 2024-02-05 20:17:02 +00:00
platform platform/x86/intel/ifs: Call release_firmware() when handling errors. 2024-01-31 16:21:20 -08:00
pmdomain Power management fixes for 6.7-rc4 2023-12-02 09:01:00 +09:00
pnp PNP: ACPI: fix fortify warning 2024-02-05 20:16:45 +00:00
power power: supply: Fix null pointer dereference in smb2_probe 2024-01-25 15:45:23 -08:00
powercap powercap: DTPM: Fix missing cpufreq_cpu_put() calls 2023-12-05 20:51:24 +01:00
pps driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
ps3 driver/ps3: Include <video/cmdline.h> for mode parsing 2023-02-20 14:56:51 +01:00
ptp ptp: ocp: fix bug in unregistering the DPLL subsystem 2023-12-29 08:37:23 +00:00
pwm pwm: Fix out-of-bounds access in of_pwm_single_xlate() 2024-01-25 15:45:14 -08:00
rapidio rapidio: make all 'class' structures const 2023-10-05 13:51:35 +02:00
ras ras/debugfs: Fix error checking for debugfs_create_dir() 2023-05-16 21:12:23 +02:00
regulator regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register 2024-02-05 20:17:07 +00:00
remoteproc remoteproc: st: Fix sometimes uninitialized ret in st_rproc_probe() 2023-10-16 11:24:34 -06:00
reset reset: Fix crash when freeing non-existent optional resets 2023-11-30 15:02:21 +01:00
rpmsg rpmsg: virtio: Free driver_override when rpmsg_remove() 2024-01-31 16:20:55 -08:00
rtc rtc: Extend timeout for waiting for UIP to clear to 1s 2024-01-31 16:21:02 -08:00
s390 s390/vfio-ap: fix sysfs status attribute for AP queue devices 2024-02-05 20:16:48 +00:00
sbus sbus: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
scsi scsi: storvsc: Fix ring buffer size calculation 2024-02-23 09:51:29 +01:00
sh sh: Remove superhyway bus support 2023-10-25 16:50:11 +02:00
siox siox: fix possible memory leak in siox_device_add() 2022-11-09 15:40:14 +01:00
slimbus driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
soc soc: xilinx: fix unhandled SGI warning message 2024-02-05 20:16:50 +00:00
soundwire soundwire: fix initializing sysfs for same devices on different buses 2024-01-31 16:20:53 -08:00
spi spi: ppc4xx: Drop write-only variable 2024-02-23 09:51:27 +01:00
spmi spmi: mediatek: Fix UAF on device remove 2024-02-05 20:17:04 +00:00
ssb ssb: relax SSB_EMBEDDED dependencies 2023-10-19 10:26:26 +03:00
staging staging: vme_user: Fix the issue of return the wrong error code 2024-02-05 20:17:04 +00:00
target scsi: target: core: add missing file_{start,end}_write() 2024-01-25 15:45:13 -08:00
tc The main MIPS changes for 5.6: 2020-01-31 11:28:31 -08:00
tee OP-TEE fix for supplicant based device enumeration 2023-12-06 16:15:26 +01:00
thermal thermal: core: Fix thermal zone suspend-resume synchronization 2024-02-05 20:16:46 +00:00
thunderbolt thunderbolt: Fix minimum allocated USB 3.x and PCIe bandwidth 2023-12-08 09:03:49 +02:00
tty tty: serial: 8250: Set RS422 interface by default to fix Moxa RS422/RS485 PCIe boards 2024-02-05 20:17:04 +00:00
ufs scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan() 2024-01-31 16:20:57 -08:00
uio uio: Fix use-after-free in uio_open 2024-01-20 11:53:01 +01:00
usb usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend 2024-02-23 09:51:32 +01:00
vdpa vdpa: Fix an error handling path in eni_vdpa_probe() 2024-01-25 15:45:23 -08:00
vfio hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume 2024-01-25 15:45:25 -08:00
vhost virtio/vsock: send credit update during setting SO_RCVLOWAT 2024-01-25 15:44:52 -08:00
video fbdev: flush deferred IO before closing 2024-01-25 15:45:13 -08:00
virt configfs-tsm for v6.7 2023-11-04 15:58:13 -10:00
virtio virtio_ring: fix syncs DMA memory with different direction 2023-12-04 08:36:25 -05:00
w1 nvmem: add explicit config option to read old syntax fixed OF cells 2023-10-21 19:19:06 +02:00
watchdog watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 2024-02-05 20:17:01 +00:00
xen xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import 2024-02-05 20:17:03 +00:00
zorro zorro: Include zorro.h in names.c 2023-08-21 13:27:44 +02:00
Kconfig - removed AR7 platform support 2023-11-10 09:19:46 -08:00
Makefile - removed AR7 platform support 2023-11-10 09:19:46 -08:00