From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@linux.intel.com>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>, bhelgaas@google.com
Cc: Mario Limonciello <mario.limonciello@amd.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Vidya Sagar <vidyas@nvidia.com>,
Michael Bottini <michael.a.bottini@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI/ASPM: Enable ASPM on external PCIe devices
Date: Thu, 15 Jun 2023 10:07:26 -0700 [thread overview]
Message-ID: <a268fc1c-dd63-cac5-4aec-836a6299ab36@linux.intel.com> (raw)
In-Reply-To: <20230615070421.1704133-1-kai.heng.feng@canonical.com>
On 6/15/23 12:04 AM, Kai-Heng Feng wrote:
> When a PCIe device is hotplugged to a Thunderbolt port, ASPM is not
> enabled for that device. However, when the device is plugged preboot,
> ASPM is enabled by default.
>
> The disparity happens because BIOS doesn't have the ability to program
> ASPM on hotplugged devices.
>
> So enable ASPM by default for external connected PCIe devices so ASPM
> settings are consitent between preboot and hotplugged.
Why it has to be consistent? Can you add info about what it solves?
>
> On HP Thunderbolt Dock G4, enable ASPM can also fix BadDLLP error:
> pcieport 0000:00:1d.0: AER: Corrected error received: 0000:07:04.0
> pcieport 0000:07:04.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID)
> pcieport 0000:07:04.0: device [8086:0b26] error status/mask=00000080/00002000
> pcieport 0000:07:04.0: [ 7] BadDLLP
>
> The root cause is still unclear, but quite likely because the I225 on
> the dock supports PTM, where ASPM timing is precalculated for the PTM.
>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217557
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/pci/pcie/aspm.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
> index 66d7514ca111..613b0754c9bb 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -119,7 +119,9 @@ static int policy_to_aspm_state(struct pcie_link_state *link)
> /* Enable Everything */
> return ASPM_STATE_ALL;
> case POLICY_DEFAULT:
> - return link->aspm_default;
> + return dev_is_removable(&link->downstream->dev) ?
> + link->aspm_capable :
> + link->aspm_default;
> }
> return 0;
> }
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
next prev parent reply other threads:[~2023-06-15 17:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 7:04 [PATCH] PCI/ASPM: Enable ASPM on external PCIe devices Kai-Heng Feng
2023-06-15 14:02 ` Ilpo Järvinen
2023-06-15 17:07 ` Sathyanarayanan Kuppuswamy [this message]
2023-06-16 2:37 ` Kai-Heng Feng
2023-06-15 17:12 ` Bjorn Helgaas
2023-06-16 3:01 ` Kai-Heng Feng
2023-06-19 16:16 ` Limonciello, Mario
2023-06-19 21:37 ` Bjorn Helgaas
2023-06-19 22:09 ` Limonciello, Mario
2023-06-20 18:28 ` Bjorn Helgaas
2023-06-20 18:36 ` Limonciello, Mario
2023-06-22 23:06 ` Bjorn Helgaas
2023-06-27 8:35 ` Kai-Heng Feng
2023-06-27 20:54 ` Bjorn Helgaas
2023-06-28 5:09 ` [Intel-wired-lan] " Kai-Heng Feng
2023-06-28 5:09 ` Kai-Heng Feng
2023-07-05 20:06 ` [Intel-wired-lan] " Bjorn Helgaas
2023-07-05 20:06 ` Bjorn Helgaas
2023-07-06 4:07 ` Mario Limonciello
2023-07-06 4:07 ` Mario Limonciello
2023-07-14 8:17 ` Kai-Heng Feng
2023-07-14 8:17 ` Kai-Heng Feng
2023-07-14 16:37 ` Mario Limonciello
2023-07-14 16:37 ` Mario Limonciello
2023-07-17 3:34 ` Kai-Heng Feng
2023-07-17 3:34 ` Kai-Heng Feng
2023-07-17 16:51 ` Limonciello, Mario
2023-07-17 16:51 ` Limonciello, Mario
2023-07-18 19:24 ` Bjorn Helgaas
2023-07-18 19:24 ` Bjorn Helgaas
2023-08-11 8:34 ` Kai-Heng Feng
2023-08-11 8:34 ` Kai-Heng Feng
2023-06-16 22:01 ` Bjorn Helgaas
2023-06-21 3:08 ` Kai-Heng Feng
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=a268fc1c-dd63-cac5-4aec-836a6299ab36@linux.intel.com \
--to=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=michael.a.bottini@linux.intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=vidyas@nvidia.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 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.