From: Mario Limonciello <superm1@kernel.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "open list:THUNDERBOLT DRIVER" <linux-usb@vger.kernel.org>,
linux-kernel@vger.kernel.org,
Andreas Noever <andreas.noever@gmail.com>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
Pooja Katiyar <pooja.katiyar@intel.com>,
Rene Sapiens <rene.sapiens@linux.intel.com>,
"S, Sanath" <Sanath.S@amd.com>
Subject: Re: [PATCH v2 0/2] thunderbolt: Fix S4 resume incongruities
Date: Fri, 9 Jan 2026 09:38:02 -0600 [thread overview]
Message-ID: <3e47698b-6e6a-45e6-a312-b7db8f473359@kernel.org> (raw)
In-Reply-To: <20260109072318.GU2275908@black.igk.intel.com>
On 1/9/26 1:23 AM, Mika Westerberg wrote:
> On Thu, Jan 08, 2026 at 01:18:58PM -0600, Mario Limonciello wrote:
>> On 1/8/26 5:42 AM, Mika Westerberg wrote:
>>> On Wed, Jan 07, 2026 at 02:50:54PM -0600, Mario Limonciello wrote:
>>>> On 1/7/26 3:33 AM, Mika Westerberg wrote:
>>>>> Hi,
>>>>>
>>>>> On Mon, Jan 05, 2026 at 11:37:47PM -0600, Mario Limonciello (AMD) wrote:
>>>>>> When a machine is restored from S4 if the firmware CM has created
>>>>>> tunnels there can be an incongruity of expectation from the kernel
>>>>>> when compared to booting from S5. This series addresses those.
>>>>>
>>>>> I suspect there is no Firmware CM in AMD platforms so this actually means
>>>>> the BIOS CM, correct?
>>>>
>>>> That's correct.
>>>>
>>>>>
>>>>> However, on S4 we actually do reset host router when the "boot kernel" is
>>>>> started before loading and jumping to the hibernation image.
>>>>
>>>> That's only if thunderbolt.ko is built into the kernel or is included in the
>>>> initramfs before it does the pivot to the hibernation image.
>>>
>>> Ah good point.
>>>
>>>> At least in the tests we were doing it's not part of the boot kernel.
>>>>
>>>>> It might be
>>>>> that this boot kernel tunnel configuration is causing the issues you are
>>>>> seeing (can you elaborate on those?)
>>>>
>>>> The issues manifest "downstream" in the GPU driver. There are a bunch of
>>>> aux failures and a non functional display. Tracing it back the GPU driver
>>>> isn't alive at the time that the tunnels are attempted to be reconstructed
>>>> at the moment and so CM tears DP tunnel down and then when GPU driver does
>>>> come up it is not functional.
>>>>
>>>> DP tunnel constructed at:
>>>>
>>>> [ 486.007194] thunderbolt 0000:c6:00.6: AUX RX path activation complete
>>>>
>>>> First DPRx timeout at:
>>>>
>>>> [ 486.135483] thunderbolt 0000:c6:00.6: 0:6 <-> 2:13 (DP): DPRX read
>>>> timeout
>>>>
>>>> DP tunnel deactivating at:
>>>>
>>>> [ 486.331856] thunderbolt 0000:c6:00.6: 0:6 <-> 2:13 (DP): deactivating
>>>
>>> Hmm, we have dprx_timeout by default 12 seconds. How come it tears down the
>>> tunnel already?
>>
>> *I believe* it's because of a hot unplug event that occurs from it not
>> working.
>>
>>>
>>>>
>>>> First DPRx DPCD reading starts at:
>>>>
>>>> [ 486.351765] amdgpu 0000:c4:00.0: amdgpu: [drm] DPIA AUX failed on
>>>> 0xf0000(10), error 7
>>>
>>> This would have maked it within the 12s if I read the timestamps right.
>>
>> Let me just share the whole log so you can see the full context.
>>
>> https://gist.github.com/superm1/6798fff44d0875b4ed0fe43d0794f81e
>
> Thanks!
>
> [Side note, you seem to have the link trained at Gen2 (20G) instead of Gen3
> (40G).]
>
> Looking at the dmesg I recalled that there is an internal report about
> similar issue by Pooja and Rene (Cc'd) and it all boils down to this log
> entry:
>
> [ 489.339148] thunderbolt 0000:c6:00.6: 2:13: could not allocate DP tunnel
>
> They made a hack patch that works it around, see below. I wonder if you
> could try that too? If that's the issue (not releasing HopIDs) then we need
> to figure a way to fix it properly.
Thanks! I shared it with our internal team that reproduced it, will come
back next week with their results.
> One suggestion is to release DP
> resources earlier, and of course doing full reset as done here. I would
> prefer "smallest" possible change.
Well FWIW the v1 of my patch for the reset was a lot smaller :P
https://lore.kernel.org/linux-usb/20251023050354.115015-1-superm1@kernel.org/#t
>
> @Pooja, any updates on your side to this?
>
> diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
> index 28c1e5c062f3..45f7ee940f10 100644
> --- a/drivers/thunderbolt/tunnel.c
> +++ b/drivers/thunderbolt/tunnel.c
> @@ -1084,6 +1084,9 @@ static void tb_dp_dprx_work(struct work_struct *work)
>
> static int tb_dp_dprx_start(struct tb_tunnel *tunnel)
> {
> + if (tunnel->dprx_started)
> + return 0;
> +
> /*
> * Bump up the reference to keep the tunnel around. It will be
> * dropped in tb_dp_dprx_stop() once the tunnel is deactivated.
next prev parent reply other threads:[~2026-01-09 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 5:37 Mario Limonciello (AMD)
2026-01-06 5:37 ` [PATCH v2 1/2] thunderbolt: Move nhi_reset before pmops declaration Mario Limonciello (AMD)
2026-01-06 5:37 ` [PATCH v2 2/2] thunderbolt: Reset NHI during S4 restore_noirq() callback Mario Limonciello (AMD)
2026-01-07 9:33 ` [PATCH v2 0/2] thunderbolt: Fix S4 resume incongruities Mika Westerberg
2026-01-07 20:50 ` Mario Limonciello
2026-01-08 11:42 ` Mika Westerberg
2026-01-08 19:18 ` Mario Limonciello
2026-01-09 7:23 ` Mika Westerberg
2026-01-09 15:38 ` Mario Limonciello [this message]
2026-01-10 0:42 ` Katiyar, Pooja
2026-01-13 18:44 ` Mario Limonciello (AMD) (kernel.org)
2026-01-17 16:57 ` Katiyar, Pooja
2026-01-19 19:59 ` Mario Limonciello (AMD) (kernel.org)
2026-01-19 22:13 ` Kenneth Crudup
2026-01-29 23:13 ` Katiyar, Pooja
2026-01-30 1:39 ` Kenneth Crudup
2026-01-30 1:42 ` Kenneth Crudup
2026-02-04 0:50 ` Katiyar, Pooja
2026-05-05 21:21 ` Mario Limonciello
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=3e47698b-6e6a-45e6-a312-b7db8f473359@kernel.org \
--to=superm1@kernel.org \
--cc=Sanath.S@amd.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pooja.katiyar@intel.com \
--cc=rene.sapiens@linux.intel.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
all inboxes | Powered by JetHome®