* [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports
@ 2026-12-01 4:11 Anthony Pighin
2026-12-01 4:17 ` Mario Limonciello
2026-12-02 17:09 ` [PATCH v2] x86/PCI: " Anthony Pighin
0 siblings, 2 replies; 7+ messages in thread
From: Anthony Pighin @ 2026-12-01 4:11 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: linux-kernel, Mario Limonciello, Yazen Ghannam, stable
AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146,
"PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO
SysError register in the DPC Extended Capability has inverted enable
bits, so its zero reset value enables System Error reporting of RP PIO
errors on every root port, and the processor may mishandle such a System
Error. No fix is planned. The documented workaround is to program bits
[18:0] of the register to 0x7_0707.
With the register at zero, a config read to a root port whose link is
down (e.g. after Link Disable or during an endpoint reset) completes
with an RP PIO error that is escalated even when all RP PIO errors are
masked. When that coincides with MMIO to an endpoint behind another root
port of the same PCIe controller, the system takes a data fabric sync
flood and resets. With the workaround, the same reads return all-ones
and are logged by AER as Advisory Non-Fatal errors.
Apply the workaround to root ports that implement the DPC RP Extensions,
at enumeration and on resume, since the DPC state saved across suspend
does not include this register.
Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21
Cc: stable@vger.kernel.org
Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
---
drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7f1f47ea2ee4..9b7512776870 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6550,6 +6550,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
#endif
+/*
+ * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The
+ * DPC RP PIO SysError register has inverted enable bits, so its zero reset
+ * value escalates Root Port PIO errors to a System Error that the processor
+ * may mishandle. Write the documented value to disable the escalation.
+ */
+static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev)
+{
+ u16 dpc, val;
+
+ dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC);
+ if (!dpc)
+ return;
+
+ pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val);
+ if (!(val & PCI_EXP_DPC_CAP_RP_EXT))
+ return;
+
+ pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
+ pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
+
/*
* For a PCI device with multiple downstream devices, its driver may use
* a flattened device tree to describe the downstream devices.
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-01 4:11 [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports Anthony Pighin
@ 2026-12-01 4:17 ` Mario Limonciello
2026-12-01 18:19 ` Anthony Pighin
2026-12-02 17:09 ` [PATCH v2] x86/PCI: " Anthony Pighin
1 sibling, 1 reply; 7+ messages in thread
From: Mario Limonciello @ 2026-12-01 4:17 UTC (permalink / raw)
To: Anthony Pighin, Bjorn Helgaas, linux-pci
Cc: linux-kernel, Yazen Ghannam, stable
On 11/30/26 22:11, Anthony Pighin wrote:
> AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146,
> "PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO
> SysError register in the DPC Extended Capability has inverted enable
> bits, so its zero reset value enables System Error reporting of RP PIO
> errors on every root port, and the processor may mishandle such a System
> Error. No fix is planned. The documented workaround is to program bits
> [18:0] of the register to 0x7_0707.
>
> With the register at zero, a config read to a root port whose link is
> down (e.g. after Link Disable or during an endpoint reset) completes
> with an RP PIO error that is escalated even when all RP PIO errors are
> masked. When that coincides with MMIO to an endpoint behind another root
> port of the same PCIe controller, the system takes a data fabric sync
> flood and resets. With the workaround, the same reads return all-ones
> and are logged by AER as Advisory Non-Fatal errors.
>
> Apply the workaround to root ports that implement the DPC RP Extensions,
> at enumeration and on resume, since the DPC state saved across suspend
> does not include this register.
>
> Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21
> Cc: stable@vger.kernel.org
> Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
> ---
> drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 7f1f47ea2ee4..9b7512776870 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -6550,6 +6550,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
> #endif
>
> +/*
> + * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The
> + * DPC RP PIO SysError register has inverted enable bits, so its zero reset
> + * value escalates Root Port PIO errors to a System Error that the processor
> + * may mishandle. Write the documented value to disable the escalation.
> + */
> +static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev)
> +{
> + u16 dpc, val;
> +
> + dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC);
> + if (!dpc)
> + return;
> +
> + pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val);
> + if (!(val & PCI_EXP_DPC_CAP_RP_EXT))
> + return;
> +
> + pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
> + pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
I would think this should apply to a few more device IDs besides 0x1453.
Is that all you saw on your 17h/0h system?
> +
> /*
> * For a PCI device with multiple downstream devices, its driver may use
> * a flattened device tree to describe the downstream devices.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-01 4:17 ` Mario Limonciello
@ 2026-12-01 18:19 ` Anthony Pighin
2026-12-01 18:22 ` Mario Limonciello
0 siblings, 1 reply; 7+ messages in thread
From: Anthony Pighin @ 2026-12-01 18:19 UTC (permalink / raw)
To: mario.limonciello, bhelgaas, linux-pci; +Cc: linux-kernel, yazen.ghannam
On Mon, Nov 30, 2026 at 10:17:45PM -0600, Mario Limonciello wrote:
> > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
> > +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
>
> I would think this should apply to a few more device IDs besides 0x1453.
> Is that all you saw on your 17h/0h system?
Yes. On our EPYC 17h/0h, all the GPP root ports enumerate as 1022:1453, and I
didn't find any other AMD root-port device ID that exposes DPC RP PIO.
You raise a good point though. Before I widen the match list, there's an open
question I'd rather settle first. The quirk keys on device ID, but the write
isn't safe on every part. On a part without the inversion, 0x0007_0707 would
enable the escalation instead of disabling it. I've asked for confirmation of
which processors are actually covered by #1146 (and whether any expose their
root ports under other device IDs). I'd prefer to hold at the verified 1022:1453
ports until they answer, since scoping this correctly may mean pinning on the
SoC family too, not just the root-port PCI ID.
Thanks,
Anthony
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-01 18:19 ` Anthony Pighin
@ 2026-12-01 18:22 ` Mario Limonciello
0 siblings, 0 replies; 7+ messages in thread
From: Mario Limonciello @ 2026-12-01 18:22 UTC (permalink / raw)
To: Anthony Pighin, bhelgaas, linux-pci; +Cc: linux-kernel, yazen.ghannam
On 12/1/26 12:19, Anthony Pighin wrote:
> On Mon, Nov 30, 2026 at 10:17:45PM -0600, Mario Limonciello wrote:
>>> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
>>> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
>>
>> I would think this should apply to a few more device IDs besides 0x1453.
>> Is that all you saw on your 17h/0h system?
>
> Yes. On our EPYC 17h/0h, all the GPP root ports enumerate as 1022:1453, and I
> didn't find any other AMD root-port device ID that exposes DPC RP PIO.
Got it.
>
> You raise a good point though. Before I widen the match list, there's an open
> question I'd rather settle first. The quirk keys on device ID, but the write
> isn't safe on every part. On a part without the inversion, 0x0007_0707 would
> enable the escalation instead of disabling it. I've asked for confirmation of
> which processors are actually covered by #1146 (and whether any expose their
> root ports under other device IDs). I'd prefer to hold at the verified 1022:1453
> ports until they answer, since scoping this correctly may mean pinning on the
> SoC family too, not just the root-port PCI ID.
>
> Thanks,
> Anthony
Since it's tied to an x86 design and on-board can you move the quirk to
arch/x86/pci/fixup.c so this doesn't compile on non-x86? If we need to
do more matching of any kind, that's a better place too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-01 4:11 [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports Anthony Pighin
2026-12-01 4:17 ` Mario Limonciello
@ 2026-12-02 17:09 ` Anthony Pighin
2026-12-02 21:42 ` Mario Limonciello
1 sibling, 1 reply; 7+ messages in thread
From: Anthony Pighin @ 2026-12-02 17:09 UTC (permalink / raw)
To: Bjorn Helgaas, linux-pci
Cc: x86, linux-kernel, Mario Limonciello, Yazen Ghannam, stable
AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146,
"PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO
SysError register in the DPC Extended Capability has inverted enable
bits, so its zero reset value enables System Error reporting of RP PIO
errors on every root port, and the processor may mishandle such a System
Error. No fix is planned. The documented workaround is to program bits
[18:0] of the register to 0x7_0707.
With the register at zero, a config read to a root port whose link is
down (e.g. after Link Disable or during an endpoint reset) completes
with an RP PIO error that is escalated even when all RP PIO errors are
masked. When that coincides with MMIO to an endpoint behind another root
port of the same PCIe controller, the system takes a data fabric sync
flood and resets. With the workaround, the same reads return all-ones
and are logged by AER as Advisory Non-Fatal errors.
Apply the workaround on Family 17h Models 00h-0Fh to root ports that
implement the DPC RP Extensions, at enumeration and on resume, since the
DPC state saved across suspend does not include this register.
Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21
Cc: stable@vger.kernel.org
Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
---
v2:
- Move the quirk to arch/x86/pci/fixup.c and limit it to Family 17h
Models 00h-0Fh, the family we were able to test on. On a part without
the inverted register, writing 0x7_0707 would enable the escalation
rather than disable it.
- Erratum #1146 also appears to affect Family 17h Models 30h-3Fh
(revision guide 56323), whose root ports are 1022:1483. That ID is
shared with parts the guide does not cover, and we have no way to test
them directly, so extending the quirk is left for future work.
v1: https://lore.kernel.org/r/20261201041109.2656367-1-anthony.pighin@nokia.com
arch/x86/pci/fixup.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 795d81c7a4de..c3d008e0032a 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -1180,3 +1180,30 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3);
#endif /* CONFIG_SUSPEND */
+
+/*
+ * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The
+ * DPC RP PIO SysError register has inverted enable bits, so its zero reset
+ * value escalates Root Port PIO errors to a System Error that the processor
+ * may mishandle. Write the documented value to disable the escalation.
+ */
+static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev)
+{
+ u16 dpc, val;
+
+ if (boot_cpu_data.x86 != 0x17 || boot_cpu_data.x86_model > 0x0f)
+ return;
+
+ dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC);
+ if (!dpc)
+ return;
+
+ pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val);
+ if (!(val & PCI_EXP_DPC_CAP_RP_EXT))
+ return;
+
+ pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
+ pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-02 17:09 ` [PATCH v2] x86/PCI: " Anthony Pighin
@ 2026-12-02 21:42 ` Mario Limonciello
2026-12-02 22:50 ` David Laight
0 siblings, 1 reply; 7+ messages in thread
From: Mario Limonciello @ 2026-12-02 21:42 UTC (permalink / raw)
To: Anthony Pighin, Bjorn Helgaas, linux-pci
Cc: x86, linux-kernel, Yazen Ghannam, stable
On 12/2/26 11:09, Anthony Pighin wrote:
> AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146,
> "PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO
> SysError register in the DPC Extended Capability has inverted enable
> bits, so its zero reset value enables System Error reporting of RP PIO
> errors on every root port, and the processor may mishandle such a System
> Error. No fix is planned. The documented workaround is to program bits
> [18:0] of the register to 0x7_0707.
>
> With the register at zero, a config read to a root port whose link is
> down (e.g. after Link Disable or during an endpoint reset) completes
> with an RP PIO error that is escalated even when all RP PIO errors are
> masked. When that coincides with MMIO to an endpoint behind another root
> port of the same PCIe controller, the system takes a data fabric sync
> flood and resets. With the workaround, the same reads return all-ones
> and are logged by AER as Advisory Non-Fatal errors.
>
> Apply the workaround on Family 17h Models 00h-0Fh to root ports that
> implement the DPC RP Extensions, at enumeration and on resume, since the
> DPC state saved across suspend does not include this register.
>
> Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21
> Cc: stable@vger.kernel.org
> Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
> ---
> v2:
> - Move the quirk to arch/x86/pci/fixup.c and limit it to Family 17h
> Models 00h-0Fh, the family we were able to test on. On a part without
> the inverted register, writing 0x7_0707 would enable the escalation
> rather than disable it.
> - Erratum #1146 also appears to affect Family 17h Models 30h-3Fh
> (revision guide 56323), whose root ports are 1022:1483. That ID is
> shared with parts the guide does not cover, and we have no way to test
> them directly, so extending the quirk is left for future work.
>
> v1: https://lore.kernel.org/r/20261201041109.2656367-1-anthony.pighin@nokia.com
>
> arch/x86/pci/fixup.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> index 795d81c7a4de..c3d008e0032a 100644
> --- a/arch/x86/pci/fixup.c
> +++ b/arch/x86/pci/fixup.c
> @@ -1180,3 +1180,30 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
> }
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3);
> #endif /* CONFIG_SUSPEND */
> +
> +/*
> + * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The
> + * DPC RP PIO SysError register has inverted enable bits, so its zero reset
> + * value escalates Root Port PIO errors to a System Error that the processor
> + * may mishandle. Write the documented value to disable the escalation.
> + */
> +static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev)
> +{
> + u16 dpc, val;
> +
> + if (boot_cpu_data.x86 != 0x17 || boot_cpu_data.x86_model > 0x0f)
> + return;
My current feeling is we don't need this check. 0x1453 should only be
in this system.
> +
> + dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC);
> + if (!dpc)
> + return;
> +
> + pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val);
> + if (!(val & PCI_EXP_DPC_CAP_RP_EXT))
> + return;
> +
> + pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
> + pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
> +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
Can you do a second commit that adds the other platform you identified
from errata? I would prefer they're separate so that in case there is a
regression we can revert one without affecting both.
From what I can tell 0x1483 is used in a system besides 17h/30h, but I
would expect this errata is technically tied to the PCI IP (NBIO) and
the reuse in another system would mean this errata applies to that as well.
By doing a second commit we can at least clean up if that turns out to
be a bad assumption.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] x86/PCI: Work around AMD erratum #1146 on Family 17h root ports
2026-12-02 21:42 ` Mario Limonciello
@ 2026-12-02 22:50 ` David Laight
0 siblings, 0 replies; 7+ messages in thread
From: David Laight @ 2026-12-02 22:50 UTC (permalink / raw)
To: Mario Limonciello
Cc: Anthony Pighin, Bjorn Helgaas, linux-pci, x86, linux-kernel,
Yazen Ghannam, stable
On Wed, 2 Dec 2026 15:42:49 -0600
Mario Limonciello <mario.limonciello@amd.com> wrote:
> On 12/2/26 11:09, Anthony Pighin wrote:
> > AMD Family 17h Models 00h-0Fh processors are affected by erratum #1146,
> > "PCIe DPC RP PIO Error Reporting May Not Function Correctly". The RP PIO
> > SysError register in the DPC Extended Capability has inverted enable
> > bits, so its zero reset value enables System Error reporting of RP PIO
> > errors on every root port, and the processor may mishandle such a System
> > Error. No fix is planned. The documented workaround is to program bits
> > [18:0] of the register to 0x7_0707.
> >
> > With the register at zero, a config read to a root port whose link is
> > down (e.g. after Link Disable or during an endpoint reset) completes
> > with an RP PIO error that is escalated even when all RP PIO errors are
> > masked. When that coincides with MMIO to an endpoint behind another root
> > port of the same PCIe controller, the system takes a data fabric sync
> > flood and resets. With the workaround, the same reads return all-ones
> > and are logged by AER as Advisory Non-Fatal errors.
> >
> > Apply the workaround on Family 17h Models 00h-0Fh to root ports that
> > implement the DPC RP Extensions, at enumeration and on resume, since the
> > DPC state saved across suspend does not include this register.
> >
> > Link: https://docs.amd.com/v/u/en-US/55449-PUB-1.21
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
> > ---
> > v2:
> > - Move the quirk to arch/x86/pci/fixup.c and limit it to Family 17h
> > Models 00h-0Fh, the family we were able to test on. On a part without
> > the inverted register, writing 0x7_0707 would enable the escalation
> > rather than disable it.
> > - Erratum #1146 also appears to affect Family 17h Models 30h-3Fh
> > (revision guide 56323), whose root ports are 1022:1483. That ID is
> > shared with parts the guide does not cover, and we have no way to test
> > them directly, so extending the quirk is left for future work.
> >
> > v1: https://lore.kernel.org/r/20261201041109.2656367-1-anthony.pighin@nokia.com
> >
> > arch/x86/pci/fixup.c | 27 +++++++++++++++++++++++++++
> > 1 file changed, 27 insertions(+)
> >
> > diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
> > index 795d81c7a4de..c3d008e0032a 100644
> > --- a/arch/x86/pci/fixup.c
> > +++ b/arch/x86/pci/fixup.c
> > @@ -1180,3 +1180,30 @@ static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
> > }
> > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3);
> > #endif /* CONFIG_SUSPEND */
> > +
> > +/*
> > + * AMD erratum #1146 (Family 17h Models 00h-0Fh Revision Guide 55449). The
> > + * DPC RP PIO SysError register has inverted enable bits, so its zero reset
> > + * value escalates Root Port PIO errors to a System Error that the processor
> > + * may mishandle. Write the documented value to disable the escalation.
> > + */
> > +static void quirk_amd_dpc_rp_pio_syserror(struct pci_dev *dev)
> > +{
> > + u16 dpc, val;
> > +
> > + if (boot_cpu_data.x86 != 0x17 || boot_cpu_data.x86_model > 0x0f)
> > + return;
>
> My current feeling is we don't need this check. 0x1453 should only be
> in this system.
>
> > +
> > + dpc = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC);
> > + if (!dpc)
> > + return;
> > +
> > + pci_read_config_word(dev, dpc + PCI_EXP_DPC_CAP, &val);
> > + if (!(val & PCI_EXP_DPC_CAP_RP_EXT))
> > + return;
> > +
> > + pci_write_config_dword(dev, dpc + PCI_EXP_DPC_RP_PIO_SYSERROR, 0x00070707);
> > + pci_info(dev, "AMD erratum #1146: disable DPC RP PIO System Error escalation\n");
> > +}
> > +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
> > +DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, 0x1453, quirk_amd_dpc_rp_pio_syserror);
>
> Can you do a second commit that adds the other platform you identified
> from errata? I would prefer they're separate so that in case there is a
> regression we can revert one without affecting both.
>
> From what I can tell 0x1483 is used in a system besides 17h/30h, but I
> would expect this errata is technically tied to the PCI IP (NBIO) and
> the reuse in another system would mean this errata applies to that as well.
>
> By doing a second commit we can at least clean up if that turns out to
> be a bad assumption.
>
Even if the workaround isn't actually applied, the list of devices it might
apply to ought to be somewhere other than just in the email.
At least that would give someone who hits the issue later a reasonable
chance of deciding that the fix does affect their device.
Otherwise the info just gets lost.
David
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-12-02 22:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 4:11 [PATCH] PCI: Work around AMD erratum #1146 on Family 17h root ports Anthony Pighin
2026-12-01 4:17 ` Mario Limonciello
2026-12-01 18:19 ` Anthony Pighin
2026-12-01 18:22 ` Mario Limonciello
2026-12-02 17:09 ` [PATCH v2] x86/PCI: " Anthony Pighin
2026-12-02 21:42 ` Mario Limonciello
2026-12-02 22:50 ` David Laight
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox