Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: Add quirk to mask ACSViol on XHCI on iMac20,1 And iMac20,2
@ 2026-11-16  1:08 Atharva Tiwari
  2026-11-16  1:24 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Atharva Tiwari @ 2026-11-16  1:08 UTC (permalink / raw)
  Cc: Atharva Tiwari, Bjorn Helgaas, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, linux-pci,
	linux-kernel

On iMac20,1 and iMac20,2 the Thunderbolt xHCI (8086:15ec) triggers an ACS
Violation on its upstream port whenever it is runtime-resumed from D3hot,
e.g. on suspend and shutdown:

  [  141.535310] pcieport 0000:00:1c.4: AER: Uncorrectable (Non-Fatal) Error message received from 0000:08:02.0
  [  141.535325] pcieport 0000:08:02.0: PCIe Bus Error: severity=Uncorrectable (Non-Fatal)
  [  141.535325] pcieport 0000:08:02.0:   device [8086:15ea] error status/mask=00200000/00000000
  [  141.535327] pcieport 0000:08:02.0:   [21] ACSViol           | Receiver    | Transaction Layer (First)
  [  141.535328] pcieport 0000:08:02.0: AER:   TLP Header: 0x34000000 0x00000010 0x00000000 0x00000000
  [  141.551637] xhci_hcd 0000:0a:00.0: AER: can't recover (no error_detected callback)
  [  141.551655] pcieport 0000:08:02.0: AER: device recovery failed

The violation is raised inside the 10 ms D3hot->D0 recovery window: the
port's AER status is still clean right after the PM_CTRL write
and set once the delay has elapsed,
before any config space has been restored.
The kernel cannot run anything in that window.
The ACPI _PS0 and _PS3 methods were also checked and have no effect on it.

This is most likely a hardware defect: the port correctly drops the
message, and the same controller on MacBookPro16,1 is not affected. The
error is unrecoverable noise, so mask ACSViol on the upstream port on these
models. ACS stays enabled.

Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
---
 arch/x86/pci/fixup.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 795d81c7a..b7c0de6c2 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -1094,6 +1094,26 @@ static void asus_disable_nvme_d3cold(struct pci_dev *pdev)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x9a09, asus_disable_nvme_d3cold);
 
+#ifdef CONFIG_PCIEAER
+/*
+ * On iMac20,1 and iMac20,2 the XHCI controller gives ACSViolations
+ * When switching from D3Hot/D3cold to D0, and it happens because of
+ * the D0 write, so we mask ACSViol at boot on these devices.
+ */
+static void titan_ridge_xhci_mask_acsv(struct pci_dev *pdev)
+{
+	struct pci_dev *up = pci_upstream_bridge(pdev);
+
+	if (!dmi_match(DMI_PRODUCT_NAME, "iMac20,1") &&
+	    !dmi_match(DMI_PRODUCT_NAME, "iMac20,2"))
+		return;
+	if (up && up->aer_cap)
+		pci_clear_and_set_config_dword(up, up->aer_cap + PCI_ERR_UNCOR_MASK,
+					       0, PCI_ERR_UNC_ACSV);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x15ec, titan_ridge_xhci_mask_acsv);
+#endif /* CONFIG_PCIEAER */
+
 #ifdef CONFIG_SUSPEND
 /*
  * Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
-- 
2.55.0


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

* Re: [PATCH] PCI: Add quirk to mask ACSViol on XHCI on iMac20,1 And iMac20,2
  2026-11-16  1:08 [PATCH] PCI: Add quirk to mask ACSViol on XHCI on iMac20,1 And iMac20,2 Atharva Tiwari
@ 2026-11-16  1:24 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-16  1:24 UTC (permalink / raw)
  To: Atharva Tiwari; +Cc: linux-pci

> On iMac20,1 and iMac20,2 the Thunderbolt xHCI (8086:15ec) triggers an ACS
> Violation on its upstream port whenever it is runtime-resumed from D3hot,
> e.g. on suspend and shutdown:
> 
>   [  141.535310] pcieport 0000:00:1c.4: AER: Uncorrectable (Non-Fatal) Error message received from 0000:08:02.0
>   [  141.535325] pcieport 0000:08:02.0: PCIe Bus Error: severity=Uncorrectable (Non-Fatal)
>   [  141.535325] pcieport 0000:08:02.0:   device [8086:15ea] error status/mask=00200000/00000000
>   [  141.535327] pcieport 0000:08:02.0:   [21] ACSViol           | Receiver    | Transaction Layer (First)
>   [  141.535328] pcieport 0000:08:02.0: AER:   TLP Header: 0x34000000 0x00000010 0x00000000 0x00000000
>   [  141.551637] xhci_hcd 0000:0a:00.0: AER: can't recover (no error_detected callback)
>   [  141.551655] pcieport 0000:08:02.0: AER: device recovery failed
> 
> The violation is raised inside the 10 ms D3hot->D0 recovery window: the
> port's AER status is still clean right after the PM_CTRL write
> and set once the delay has elapsed,
> before any config space has been restored.
> The kernel cannot run anything in that window.
> The ACPI _PS0 and _PS3 methods were also checked and have no effect on it.
> 
> This is most likely a hardware defect: the port correctly drops the
> message, and the same controller on MacBookPro16,1 is not affected. The
> error is unrecoverable noise, so mask ACSViol on the upstream port on these
> models. ACS stays enabled.
> 
> Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116010835.1191-1-atharvatiwarilinuxdev@gmail.com?part=1


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

end of thread, other threads:[~2026-11-16  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16  1:08 [PATCH] PCI: Add quirk to mask ACSViol on XHCI on iMac20,1 And iMac20,2 Atharva Tiwari
2026-11-16  1:24 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox