All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2
@ 2026-12-02  3:27 ChunAn Wu
  2026-12-02  3:30 ` sashiko-bot
  2026-12-02 10:58 ` Lukas Wunner
  0 siblings, 2 replies; 3+ messages in thread
From: ChunAn Wu @ 2026-12-02  3:27 UTC (permalink / raw)
  To: lukas; +Cc: bhelgaas, linux-pci, stable

Since commit eddba19b8b5f ("PCI/AER: Support Advisory Non-Fatal
Errors"), pci_aer_init() unmasks Advisory Non-Fatal Errors (ANFE) on
devices with native AER.

On the Dell Pro Precision 9 R2 PW9R2275, enumeration reads absent devices
behind some bridges, such as the PLDA PCIe-to-PCI bridge in front of the
BMC VGA device and the PCIe switch in front of an AMD GPU.  The bridge
returns a UR completion and, with ANFE unmasked, also signals the error
through Firmware First.  The firmware reports it as a fatal error even
though the hardware severity is non-fatal (bit 20 of the Uncorrectable
Error Severity register is clear).  The kernel then resets the Root Port,
the devices behind it lose their configuration, recovery fails, and the
VGA or the GPU becomes inaccessible.  Kernels before v7.3 are not
affected.

Set no_aer_anfe with an early fixup, as done for the Apple T2 Secure
Enclave in commit 7209846a169f ("PCI/AER: Keep ANFE masked on Apple T2
Secure Enclave"), so that pci_aer_init() leaves ANFE masked.  Restrict
it to this system with a DMI match because the problem comes from the
platform firmware.  Limiting it to the devices seen so far is not enough,
since any device that returns a UR for an absent function triggers it.

Fixes: eddba19b8b5f ("PCI/AER: Support Advisory Non-Fatal Errors")
Cc: stable@vger.kernel.org
Signed-off-by: ChunAn Wu <an.wu@canonical.com>
---
Changes in v2:
- Restrict the quirk to this system with a DMI match instead of
  matching the PLDA bridge ID, as suggested by Lukas.
- Apply it to all devices on the system.  Masking ANFE only on the PLDA
  bridge (1556:be00) and the AMD switch port (1002:1478) was not enough:
  the same error then came from the AMD switch downstream port and the
  GPU functions, so the quirk is not limited to the devices seen so far.
- Tested on Dell Pro Precision 9 R2 PW9R2275 (BIOS 0.0.8): no GHES
  fatal records, and both amdgpu and mgag200 probe.

v1: https://lore.kernel.org/r/20261125020013.639193-1-an.wu@canonical.com/

 drivers/pci/quirks.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 4a02fc80755d..8ae8c848d91c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2610,6 +2610,36 @@ static void quirk_no_aer_anfe(struct pci_dev *dev)
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_APPLE, 0x1802, quirk_no_aer_anfe);
 
+/*
+ * On the systems below, platform firmware reports an Advisory Non-Fatal
+ * Error caused by a UR, such as one raised when enumeration reads an absent
+ * device behind a bridge, as a fatal error.  The Root Port is then reset and
+ * the devices below it become inaccessible.  This was seen with the PLDA
+ * PCIe-to-PCI bridge in front of the BMC VGA device and with the PCIe switch
+ * in front of an AMD GPU.
+ */
+static const struct dmi_system_id no_aer_anfe_dmi_table[] = {
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Dell Pro Precision 9 R2 PW9R2275"),
+		},
+	},
+	{ }
+};
+
+static void quirk_dmi_no_aer_anfe(struct pci_dev *dev)
+{
+	static int dmi_matched = -1;
+
+	if (dmi_matched < 0)
+		dmi_matched = dmi_check_system(no_aer_anfe_dmi_table) ? 1 : 0;
+
+	if (dmi_matched)
+		dev->no_aer_anfe = 1;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, quirk_dmi_no_aer_anfe);
+
 /*
  * Under some circumstances, AER is not linked with extended capabilities.
  * Force it to be linked by setting the corresponding control bit in the
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2
  2026-12-02  3:27 [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2 ChunAn Wu
@ 2026-12-02  3:30 ` sashiko-bot
  2026-12-02 10:58 ` Lukas Wunner
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-02  3:30 UTC (permalink / raw)
  To: ChunAn Wu; +Cc: linux-pci

> Since commit eddba19b8b5f ("PCI/AER: Support Advisory Non-Fatal
> Errors"), pci_aer_init() unmasks Advisory Non-Fatal Errors (ANFE) on
> devices with native AER.
> 
> On the Dell Pro Precision 9 R2 PW9R2275, enumeration reads absent devices
> behind some bridges, such as the PLDA PCIe-to-PCI bridge in front of the
> BMC VGA device and the PCIe switch in front of an AMD GPU.  The bridge
> returns a UR completion and, with ANFE unmasked, also signals the error
> through Firmware First.  The firmware reports it as a fatal error even
> though the hardware severity is non-fatal (bit 20 of the Uncorrectable
> Error Severity register is clear).  The kernel then resets the Root Port,
> the devices behind it lose their configuration, recovery fails, and the
> VGA or the GPU becomes inaccessible.  Kernels before v7.3 are not
> affected.
> 
> Set no_aer_anfe with an early fixup, as done for the Apple T2 Secure
> Enclave in commit 7209846a169f ("PCI/AER: Keep ANFE masked on Apple T2
> Secure Enclave"), so that pci_aer_init() leaves ANFE masked.  Restrict
> it to this system with a DMI match because the problem comes from the
> platform firmware.  Limiting it to the devices seen so far is not enough,
> since any device that returns a UR for an absent function triggers it.
> 
> Fixes: eddba19b8b5f ("PCI/AER: Support Advisory Non-Fatal Errors")
> Cc: stable@vger.kernel.org
> Signed-off-by: ChunAn Wu <an.wu@canonical.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202032740.123728-1-an.wu@canonical.com?part=1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2
  2026-12-02  3:27 [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2 ChunAn Wu
  2026-12-02  3:30 ` sashiko-bot
@ 2026-12-02 10:58 ` Lukas Wunner
  1 sibling, 0 replies; 3+ messages in thread
From: Lukas Wunner @ 2026-12-02 10:58 UTC (permalink / raw)
  To: ChunAn Wu; +Cc: bhelgaas, linux-pci, stable

On Wed, Dec 02, 2026 at 11:27:40AM +0800, ChunAn Wu wrote:
> Since commit eddba19b8b5f ("PCI/AER: Support Advisory Non-Fatal
> Errors"), pci_aer_init() unmasks Advisory Non-Fatal Errors (ANFE) on
> devices with native AER.
> 
> On the Dell Pro Precision 9 R2 PW9R2275, enumeration reads absent devices
> behind some bridges, such as the PLDA PCIe-to-PCI bridge in front of the
> BMC VGA device and the PCIe switch in front of an AMD GPU.  The bridge
> returns a UR completion and, with ANFE unmasked, also signals the error
> through Firmware First.  The firmware reports it as a fatal error even
> though the hardware severity is non-fatal (bit 20 of the Uncorrectable
> Error Severity register is clear).
[...]
> - Tested on Dell Pro Precision 9 R2 PW9R2275 (BIOS 0.0.8): no GHES
>   fatal records, and both amdgpu and mgag200 probe.

That's a brand new machine with the latest "Granite Rapids" Xeon CPU.
The BIOS version looks like it's still in beta.

Isn't there a newer BIOS available from Dell?  Do you have an FAE or
other contact there whom you could ask for the BIOS to be fixed?

Usually quirks are only accepted if there's no newer, fixed BIOS available
and the vendor is never going to provide one.

> +++ b/drivers/pci/quirks.c

This would better fit in arch/x86/pci/fixup.c so that's it's not compiled
on other arches that don't need it.  Also it should be #ifdef'ed to
CONFIG_PCIEAER.

> +static void quirk_dmi_no_aer_anfe(struct pci_dev *dev)
> +{
> +	static int dmi_matched = -1;
> +
> +	if (dmi_matched < 0)
> +		dmi_matched = dmi_check_system(no_aer_anfe_dmi_table) ? 1 : 0;
> +
> +	if (dmi_matched)
> +		dev->no_aer_anfe = 1;
> +}

Why not simply:

	if (dmi_check_system(no_aer_anfe_dmi_table))
		dev->no_aer_anfe = 1;

?

> +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, quirk_dmi_no_aer_anfe);

Applying this to all devices is pretty heavy-handed:  It means a DMI check
is performed for *every* PCI device on *every* x86 machine.  It would be
better to constrain it to the Vendor/Device IDs that actually need it.

But again, if Dell can provide a fixed BIOS that would be even better.

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-02 10:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02  3:27 [PATCH v2] PCI/AER: Keep ANFE masked on Dell Pro Precision 9 R2 ChunAn Wu
2026-12-02  3:30 ` sashiko-bot
2026-12-02 10:58 ` Lukas Wunner

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.