All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Lukas Wunner <lukas@wunner.de>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Terry Bowman <terry.bowman@amd.com>,
	Ilpo Jarvinen	 <ilpo.jarvinen@linux.intel.com>,
	Sathyanarayanan Kuppuswamy	
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	Linas Vepstas	 <linasvepstas@gmail.com>,
	Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
	Oliver OHalloran <oohall@gmail.com>,
	linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
	linux-doc@vger.kernel.org,
	Brian Norris <briannorris@chromium.org>
Subject: Re: [PATCH v2 3/4] Documentation: PCI: Amend error recovery doc with DPC/AER specifics
Date: Mon, 15 Sep 2025 17:43:53 +0200	[thread overview]
Message-ID: <3f57e4d2d317fecf50e1b87e5cce8a848e4098b3.camel@linux.ibm.com> (raw)
In-Reply-To: <61d8eeadb20ee71c3a852f44c863bfe0209c454d.1757942121.git.lukas@wunner.de>

On Mon, 2025-09-15 at 15:50 +0200, Lukas Wunner wrote:
> 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>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> ---
>  Documentation/PCI/pci-error-recovery.rst | 22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> diff --git a/Documentation/PCI/pci-error-recovery.rst b/Documentation/PCI/pci-error-recovery.rst
> index d5c661baa87f..9e1e2f2a13fa 100644
> --- a/Documentation/PCI/pci-error-recovery.rst
> +++ b/Documentation/PCI/pci-error-recovery.rst
> @@ -122,6 +122,10 @@ A PCI bus error is detected by the PCI hardware.  On powerpc, the slot
>  is isolated, in that all I/O is blocked: all reads return 0xffffffff,
>  all writes are ignored.
>  
> +Similarly, on platforms supporting Downstream Port Containment
> +(PCIe r7.0 sec 6.2.11), the link to the sub-hierarchy with the
> +faulting device is disabled. Any device in the sub-hierarchy
> +becomes inaccessible.
>  
>  STEP 1: Notification
>  --------------------
> @@ -204,6 +208,24 @@ link reset was performed by the HW. If the platform can't just re-enable IOs
>  without a slot reset or a link reset, it will not call this callback, and
>  instead will have gone directly to STEP 3 (Link Reset) or STEP 4 (Slot Reset)
>  
> +.. note::
> +
> +   On platforms supporting Advanced Error Reporting (PCIe r7.0 sec 6.2),
> +   the faulting device may already be accessible in STEP 1 (Notification).
> +   Drivers should nevertheless defer accesses to STEP 2 (MMIO Enabled)
> +   to be compatible with EEH on powerpc and with s390 (where devices are
> +   inaccessible until STEP 2).
> +
> +   On platforms supporting Downstream Port Containment, the link to the
> +   sub-hierarchy with the faulting device is re-enabled in STEP 3 (Link
> +   Reset). Hence devices in the sub-hierarchy are inaccessible until
> +   STEP 4 (Slot Reset).
> +
> +   For errors such as Surprise Down (PCIe r7.0 sec 6.2.7), the device
> +   may not even be accessible in STEP 4 (Slot Reset). Drivers can detect
> +   accessibility by checking whether reads from the device return all 1's
> +   (PCI_POSSIBLE_ERROR()).
> +
>  .. note::
>  
>     The following is proposed; no platform implements this yet:

Thanks for improving this. Makes sense to mention and spell this out
explicitly.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>

  reply	other threads:[~2025-09-15 15:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 13:50 [PATCH v2 0/4] Documentation: PCI: Update error recovery docs Lukas Wunner
2025-09-15 13:50 ` [PATCH v2 1/4] Documentation: PCI: Sync AER doc with code Lukas Wunner
2025-09-15 13:50 ` [PATCH v2 2/4] Documentation: PCI: Sync error recovery " Lukas Wunner
2025-09-15 15:51   ` Niklas Schnelle
2025-09-15 13:50 ` [PATCH v2 3/4] Documentation: PCI: Amend error recovery doc with DPC/AER specifics Lukas Wunner
2025-09-15 15:43   ` Niklas Schnelle [this message]
2025-09-15 13:50 ` [PATCH v2 4/4] Documentation: PCI: Tidy error recovery doc's PCIe nomenclature Lukas Wunner
2025-09-15 15:46   ` Niklas Schnelle
2025-09-15 15:25 ` [PATCH v2 0/4] Documentation: PCI: Update error recovery docs Sathyanarayanan Kuppuswamy
2025-09-16 15:55 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3f57e4d2d317fecf50e1b87e5cce8a848e4098b3.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=briannorris@chromium.org \
    --cc=corbet@lwn.net \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linasvepstas@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lukas@wunner.de \
    --cc=mahesh@linux.ibm.com \
    --cc=oohall@gmail.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=terry.bowman@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.