From: Stefan Roese <stefan.roese@mailbox.org>
To: Lukas Wunner <lukas@wunner.de>, Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org,
Mahesh J Salgaonkar <mahesh@linux.ibm.com>,
Oliver OHalloran <oohall@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] PCI/AER: Stop ruling out unbound devices as error source
Date: Mon, 30 Mar 2026 08:32:28 +0200 [thread overview]
Message-ID: <e2b13d94-3f0c-4c2f-87b9-209f1ac04f23@mailbox.org> (raw)
In-Reply-To: <734338c2e8b669db5a5a3b45d34131b55ffebfca.1774605029.git.lukas@wunner.de>
On 3/27/26 10:56, Lukas Wunner wrote:
> When searching for the error source, the AER driver rules out devices
> whose enable_cnt is zero. This was introduced in 2009 by commit
> 28eb27cf0839 ("PCI AER: support invalid error source IDs") without
> providing a rationale.
>
> Drivers typically call pci_enable_device() on probe, hence the enable_cnt
> check essentially filters out unbound devices. At the time of the commit,
> drivers had to opt in to AER by calling pci_enable_pcie_error_reporting()
> and so any AER-enabled device could be assumed to be bound to a driver.
> The check thus made sense because it allowed skipping config space
> accesses to devices which were known not to be the error source.
>
> But since 2022, AER is universally enabled on all devices when they are
> enumerated, cf. commit f26e58bf6f54 ("PCI/AER: Enable error reporting when
> AER is native").
>
> Errors may very well be reported by unbound devices, e.g. due to link
> instability. By ruling them out as error source, errors reported by them
> are neither logged nor cleared. When they do get bound and another error
> occurs, the earlier error is reported together with the new error, which
> may confuse users. Stop doing so.
>
> Fixes: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Cc: stable@vger.kernel.org # v6.0+
> ---
> drivers/pci/pcie/aer.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index 4299c55..384d026 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -1039,8 +1039,6 @@ static bool is_error_source(struct pci_dev *dev, struct aer_err_info *e_info)
> * 3) There are multiple errors and prior ID comparing fails;
> * We check AER status registers to find possible reporter.
> */
> - if (atomic_read(&dev->enable_cnt) == 0)
> - return false;
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
Thanks,
Stefan
next prev parent reply other threads:[~2026-03-30 6:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 9:56 [PATCH] PCI/AER: Stop ruling out unbound devices as error source Lukas Wunner
2026-03-30 6:32 ` Stefan Roese [this message]
2026-03-30 19:19 ` 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=e2b13d94-3f0c-4c2f-87b9-209f1ac04f23@mailbox.org \
--to=stefan.roese@mailbox.org \
--cc=helgaas@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 \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox