From: Max Lee <max.lee@canonical.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
acelan.kao@canonical.com, Max Lee <max.lee@canonical.com>
Subject: [PATCH v2] PCI: Mask Replay Timer Timeout for Realtek RTS525A
Date: Wed, 10 Jun 2026 10:47:23 +0800 [thread overview]
Message-ID: <20260610024723.188514-1-max.lee@canonical.com> (raw)
In-Reply-To: <20260528032347.644365-1-max.lee@canonical.com>
The Realtek RTS525A PCI-Express SD card reader (10ec:525a) generates
excessive Correctable Error (Replay Timer Timeout) AER events during
PCIe link initialization. On systems where firmware enables AER
reporting (CERptEn+), this causes an AER storm of ~240K error events
within 11 seconds of boot, overwhelming the kernel error handler and
blocking shutdown/reboot.
The root cause is a transient link training instability inherent to this
device -- even on BIOS versions that suppress reporting, the error
status register (CESta) shows Timeout+ set.
Unlike the GL9750/GL9755 fixup, which only masks the parent root port,
the RTS525A also needs its endpoint Correctable Error Mask bit 12
(PCI_ERR_COR_REP_TIMER) masked when the endpoint exposes AER, so it does
not send ERR_COR messages upstream. Also mask the parent root port to
cover root-port reporting of link errors caused by the endpoint.
Signed-off-by: Max Lee <max.lee@canonical.com>
---
Changes in v2:
- Mask the parent root port even when the endpoint lacks AER capability.
- Remove the early return before parent root port masking.
drivers/pci/quirks.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index caaed1a01dc0..6597536a4c70 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -6380,4 +6380,26 @@ static void pci_mask_replay_timer_timeout(struct pci_dev *pdev)
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9750, pci_mask_replay_timer_timeout);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9755, pci_mask_replay_timer_timeout);
+
+static void pci_mask_replay_timer_timeout_on_endpoint(struct pci_dev *pdev)
+{
+ u32 val;
+
+ if (pdev->aer_cap) {
+ pci_info(pdev, "mask Replay Timer Timeout on endpoint due to hardware defect\n");
+
+ pci_read_config_dword(pdev, pdev->aer_cap + PCI_ERR_COR_MASK, &val);
+ val |= PCI_ERR_COR_REP_TIMER;
+ pci_write_config_dword(pdev, pdev->aer_cap + PCI_ERR_COR_MASK, val);
+ }
+
+ /*
+ * Also mask the parent root port. Do this even if the endpoint lacks
+ * AER capability because the root port may still report link errors
+ * caused by the endpoint.
+ */
+ pci_mask_replay_timer_timeout(pdev);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, 0x525a,
+ pci_mask_replay_timer_timeout_on_endpoint);
#endif
--
2.43.0
next prev parent reply other threads:[~2026-06-10 2:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 3:23 [PATCH] PCI: Mask Replay Timer Timeout for Realtek RTS525A Max Lee
2026-05-28 3:41 ` sashiko-bot
2026-06-10 2:47 ` Max Lee [this message]
2026-07-01 6:27 ` [PATCH v2] " Manivannan Sadhasivam
2026-07-01 20:42 ` Bjorn Helgaas
2026-07-02 5:10 ` Lukas Wunner
2026-07-02 7:06 ` Max Lee
2026-07-02 14:42 ` Lukas Wunner
2026-07-06 2:34 ` Max Lee
2026-07-02 8:08 ` Manivannan Sadhasivam
2026-07-06 2:53 ` [PATCH v3] PCI: Disable ASPM L0s " Max Lee
2026-07-06 3:04 ` sashiko-bot
2026-07-06 9:41 ` Lukas Wunner
2026-07-06 10:20 ` Manivannan Sadhasivam
2026-07-07 2:15 ` [PATCH v4] " Max Lee
2026-07-07 2:20 ` sashiko-bot
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=20260610024723.188514-1-max.lee@canonical.com \
--to=max.lee@canonical.com \
--cc=acelan.kao@canonical.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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.