Skip to content

Commit 15dea68

Browse files
l1kbjorn-helgaas
authored andcommitted
Documentation: PCI: Amend error recovery doc with DPC/AER specifics
Amend the documentation on PCI error recovery with specifics about Downstream Port Containment and Advanced Error Reporting: * Explain that with DPC, devices are inaccessible upon an error (similar to EEH on powerpc) and do not become accessible until the link is re-enabled. * Explain that with AER, although devices may already be accessible in the ->error_detected() callback, accesses should be deferred to the ->mmio_enabled() callback for compatibility with EEH on powerpc and with s390. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Link: https://patch.msgid.link/61d8eeadb20ee71c3a852f44c863bfe0209c454d.1757942121.git.lukas@wunner.de
1 parent 8e4a13f commit 15dea68

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Documentation/PCI/pci-error-recovery.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ A PCI bus error is detected by the PCI hardware. On powerpc, the slot
122122
is isolated, in that all I/O is blocked: all reads return 0xffffffff,
123123
all writes are ignored.
124124

125+
Similarly, on platforms supporting Downstream Port Containment
126+
(PCIe r7.0 sec 6.2.11), the link to the sub-hierarchy with the
127+
faulting device is disabled. Any device in the sub-hierarchy
128+
becomes inaccessible.
125129

126130
STEP 1: Notification
127131
--------------------
@@ -204,6 +208,24 @@ link reset was performed by the HW. If the platform can't just re-enable IOs
204208
without a slot reset or a link reset, it will not call this callback, and
205209
instead will have gone directly to STEP 3 (Link Reset) or STEP 4 (Slot Reset)
206210

211+
.. note::
212+
213+
On platforms supporting Advanced Error Reporting (PCIe r7.0 sec 6.2),
214+
the faulting device may already be accessible in STEP 1 (Notification).
215+
Drivers should nevertheless defer accesses to STEP 2 (MMIO Enabled)
216+
to be compatible with EEH on powerpc and with s390 (where devices are
217+
inaccessible until STEP 2).
218+
219+
On platforms supporting Downstream Port Containment, the link to the
220+
sub-hierarchy with the faulting device is re-enabled in STEP 3 (Link
221+
Reset). Hence devices in the sub-hierarchy are inaccessible until
222+
STEP 4 (Slot Reset).
223+
224+
For errors such as Surprise Down (PCIe r7.0 sec 6.2.7), the device
225+
may not even be accessible in STEP 4 (Slot Reset). Drivers can detect
226+
accessibility by checking whether reads from the device return all 1's
227+
(PCI_POSSIBLE_ERROR()).
228+
207229
.. note::
208230

209231
The following is proposed; no platform implements this yet:

0 commit comments

Comments
 (0)