]> Gentwo Git Trees - linux/.git/commit
Documentation: PCI: Amend error recovery doc with pci_save_state() rules
authorLukas Wunner <lukas@wunner.de>
Fri, 21 Nov 2025 17:31:17 +0000 (18:31 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Nov 2025 22:59:10 +0000 (16:59 -0600)
commit5e09895b4063e9f57c6fc416cf30cd0c6ca7ec74
tree85b5ae1e6c75d312a03e24e7cd1811fa37efad4b
parent383d89699c5028de510a6667f674ed38585f77fc
Documentation: PCI: Amend error recovery doc with pci_save_state() rules

After recovering from a PCI error through reset, affected devices are in
D0_uninitialized state and need to be brought into D0_active state by
re-initializing their Config Space registers (PCIe r7.0 sec 5.3.1.1).

To facilitate that, the PCI core provides pci_restore_state() and
pci_save_state() helpers.  Document rules governing their usage.

As Bjorn notes, so far no file in "Documentation/ includes anything about
the idea of a driver using pci_save_state() to capture the state it wants
to restore after an error", even though it is a common pattern in drivers.
So that's obviously a gap that should be closed.

Reported-by: Bjorn Helgaas <helgaas@kernel.org>
Closes: https://lore.kernel.org/r/20251113161556.GA2284238@bhelgaas/
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Link: https://patch.msgid.link/077596ba70202be0e43fdad3bb9b93d356cbe4ec.1763746079.git.lukas@wunner.de
Documentation/PCI/pci-error-recovery.rst