]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI: Wait for device readiness after D3hot -> D0uninitialized transition
authorBjorn Helgaas <helgaas@kernel.org>
Mon, 18 May 2026 19:12:19 +0000 (14:12 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 18 May 2026 22:27:16 +0000 (17:27 -0500)
commit41167a1e98536b4baf0846fd259c8124bd1c4e1b
treec53220ca91991aad9ece988f6a8a3285ac8b13db
parent6113cea475959372e8e07144fa3824642440f388
PCI: Wait for device readiness after D3hot -> D0uninitialized transition

For a device that advertises No_Soft_Reset == 0, a transition from D3hot to
D0uninitialized is a soft reset, and the resulting internal device state is
undefined.

Per PCIe r7.0, sec 2.3.1, a transition from D3hot to D0uninitialized
mandates a minimum 10 ms delay before accessing the device. Following this
delay, the device is permitted to respond to initial configuration requests
with a Request Retry Status (RRS) completion status if it needs more time
to initialize.

Call pci_dev_wait() after pci_power_up() performs a D3hot->D0uninitialized
transition to ensure the device is ready to accept config accesses, as is
done after the similar transition in pci_pm_reset().

If the device is already ready, this is essentially a no-op except for one
additional config read.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Link: https://patch.msgid.link/20260518191220.636213-3-bhelgaas@google.com
drivers/pci/pci.c