public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: hans.zhang@cixtech.com
Cc: bhelgaas@google.com, cix-kernel-upstream@cixtech.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Chen <peter.chen@cixtech.com>,
	ChunHao Lin <hau@realtek.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	nic_swsd@realtek.com, netdev@vger.kernel.org
Subject: Re: [PATCH] PCI: Add PCI quirk to disable L0s ASPM state for RTL8125 2.5GbE Controller
Date: Wed, 5 Mar 2025 16:20:16 -0600	[thread overview]
Message-ID: <20250305222016.GA316198@bhelgaas> (raw)
In-Reply-To: <20250305063035.415717-1-hans.zhang@cixtech.com>

[+cc r8169 maintainers, since upstream r8169 claims device 0x8125]

On Wed, Mar 05, 2025 at 02:30:35PM +0800, hans.zhang@cixtech.com wrote:
> From: Hans Zhang <hans.zhang@cixtech.com>
> 
> This patch is intended to disable L0s ASPM link state for RTL8125 2.5GbE
> Controller due to the fact that it is possible to corrupt TX data when
> coming back out of L0s on some systems. This quirk uses the ASPM api to
> prevent the ASPM subsystem from re-enabling the L0s state.

Sounds like this should be a documented erratum.  Realtek folks?  Or
maybe an erratum on the other end of the link, which looks like a CIX
Root Port:

  https://admin.pci-ids.ucw.cz/read/PC/1f6c/0001

If it's a CIX Root Port defect, it could affect devices other than
RTL8125.

> And it causes the following AER errors:
>   pcieport 0003:30:00.0: AER: Multiple Corrected error received: 0003:31:00.0
>   pcieport 0003:30:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID)
>   pcieport 0003:30:00.0:   device [1f6c:0001] error status/mask=00001000/0000e000
>   pcieport 0003:30:00.0:    [12] Timeout
>   r8125 0003:31:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Transmitter ID)
>   r8125 0003:31:00.0:   device [10ec:8125] error status/mask=00001000/0000e000
>   r8125 0003:31:00.0:    [12] Timeout
>   r8125 0003:31:00.0: AER:   Error of this Agent is reported first

Looks like a driver name of "r8125", but I don't see that upstream.
Is this an out-of-tree driver?

> And the RTL8125 website does not say that it supports L0s. It only supports
> L1 and L1ss.
> 
> RTL8125 website: https://www.realtek.com/Product/Index?id=3962

I don't think it matters what the web site says.  Apparently the
device advertises L0s support via Link Capabilities.

> Signed-off-by: Hans Zhang <hans.zhang@cixtech.com>
> Reviewed-by: Peter Chen <peter.chen@cixtech.com>
> ---
>  drivers/pci/quirks.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 82b21e34c545..5f69bb5ee3ff 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2514,6 +2514,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s);
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s);
>  
> +/*
> + * The RTL8125 may experience data corruption issues when transitioning out
> + * of L0S. To prevent this we need to disable L0S on the PCIe link.
> + */
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_REALTEK, 0x8125, quirk_disable_aspm_l0s);
> +
>  static void quirk_disable_aspm_l0s_l1(struct pci_dev *dev)
>  {
>  	pci_info(dev, "Disabling ASPM L0s/L1\n");
> 
> base-commit: 99fa936e8e4f117d62f229003c9799686f74cebc
> -- 
> 2.47.1
> 

       reply	other threads:[~2025-03-05 22:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250305063035.415717-1-hans.zhang@cixtech.com>
2025-03-05 22:20 ` Bjorn Helgaas [this message]
2025-03-06  3:16   ` [PATCH] PCI: Add PCI quirk to disable L0s ASPM state for RTL8125 2.5GbE Controller hans.zhang
2025-03-06  3:32   ` hans.zhang
2025-03-06 16:28     ` Bjorn Helgaas
2025-03-07  1:38       ` hans.zhang
2025-03-06 23:00   ` Heiner Kallweit

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=20250305222016.GA316198@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=cix-kernel-upstream@cixtech.com \
    --cc=hans.zhang@cixtech.com \
    --cc=hau@realtek.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=peter.chen@cixtech.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