Linux USB
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Achim Löbbert" <aloebbert@gmx.de>
Cc: Mario Limonciello <superm1@kernel.org>, linux-usb@vger.kernel.org
Subject: Re: [REGRESSION/BUG] thunderbolt: ASM4242 fails to restore DP tunnel after resume on Ryzen 8700G (7.4-rc4)
Date: Thu, 3 Dec 2026 18:28:10 +0100	[thread overview]
Message-ID: <20261203172810.GB953667@black.igk.intel.com> (raw)
In-Reply-To: <ioZagLtoQxuBOr3I0l9VHA@gmx.de>

On Thu, Dec 03, 2026 at 06:22:15PM +0100, Achim Löbbert wrote:
> Hi Mika,
> 
> On Thursday, 3. December 2026 15:28:32 CET Mika Westerberg wrote:
> > Thanks for testing. I wonder if you can still give the below a go because I
> > noticed an issue with the latest changes in my tree on Intel at least. So
> > the below patch on top of my next branch here:
> > 
> >  
> > https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git/log
> > /?h=next
> > 
> > Also it would be good if Mario could try on AMD as well just to make sure
> > this does not break them (should be same flow for all and I don't see why
> > it would break something but you never know). There is small side-effect
> > that DP tunnels may be created bit earlier but that should not matter.
> > 
> > diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
> > index 10fca534ff78..c27490b626c9 100644
> > --- a/drivers/thunderbolt/tb.c
> > +++ b/drivers/thunderbolt/tb.c
> > @@ -3166,6 +3166,8 @@ static void tb_restore_children(struct tb_switch *sw)
> >  	if (tb_enable_tmu(sw))
> >  		tb_sw_warn(sw, "failed to restore TMU configuration\n");
> > 
> > +	tb_add_dp_resources(sw);
> > +
> >  	tb_switch_configuration_valid(sw);
> > 
> >  	tb_switch_for_each_port(sw, port) {
> > @@ -3223,15 +3225,15 @@ static int tb_resume_noirq(struct tb *tb, bool
> > hibernate) tb_free_invalid_tunnels(tb);
> >  	tb_free_unplugged_children(tb->root_switch);
> >  	tb_free_unplugged_xdomains(tb->root_switch);
> > -	tb_restore_children(tb->root_switch);
> > 
> >  	if (hibernate) {
> >  		tb_disconnect_and_release_dp(tb);
> > -		tb_add_dp_resources(tb->root_switch);
> >  		tb_switch_exit_redrive(tb->root_switch);
> >  		usb3_delay = true;
> >  	}
> > 
> > +	tb_restore_children(tb->root_switch);
> > +
> >  	/* Re-create our tunnels now */
> >  	list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) {
> >  		/*
> 
> The patch does not apply for some reason, at least partly. Same result for 
> gentoo git-sources (7.4-rc5) as well as on the git respository you specified:
> 
> $ git clone https://git.kernel.org/pub/scm/linux/kernel/git/westeri/
> thunderbolt.git
> $ cd thunderbolt
> $ patch -p1 --dry-run < ~/work/patches/linux-usb/0002-thunderbolt-Re-plug-
> ASM4242-DP-tunnels-once-system-r.patch 
> checking file drivers/thunderbolt/tb.c
> Hunk #1 succeeded at 3134 (offset -32 lines).
> Hunk #2 FAILED at 3225.
> 1 out of 2 hunks FAILED
> 
> Wonder why hunk #1 succeeds and #2 fails and thought better ask before strange 
> results are generated.

You need to check out the "next" branch:

 $ git checkout next

then apply the patch.

  reply	other threads:[~2026-12-03 17:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 17:10 [REGRESSION/BUG] thunderbolt: ASM4242 fails to restore DP tunnel after resume on Ryzen 8700G (7.4-rc4) Achim Löbbert
2026-11-26  7:31 ` Mika Westerberg
2026-11-26  8:53   ` Achim Löbbert
2026-11-26 12:27     ` Mika Westerberg
2026-11-26 16:59       ` Achim Löbbert
2026-11-27  5:35         ` Mika Westerberg
2026-11-27 18:13           ` Achim Löbbert
2026-11-29  3:36             ` Mario Limonciello
2026-11-30 19:16               ` Achim Löbbert
2026-12-01  4:29                 ` Mario Limonciello
2026-12-01 14:45                   ` Achim Löbbert
2026-12-01 14:53                     ` Mario Limonciello
2026-12-01 17:24                       ` Achim Löbbert
2026-12-01 17:36                         ` Mario Limonciello
2026-12-01 19:17                           ` Achim Löbbert
2026-12-01 19:59                             ` Mario Limonciello
2026-12-02  8:40                               ` Achim Löbbert
2026-12-03 14:28                                 ` Mika Westerberg
2026-12-03 17:22                                   ` Achim Löbbert
2026-12-03 17:28                                     ` Mika Westerberg [this message]
2026-12-03 17:25                                   ` 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=20261203172810.GB953667@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=aloebbert@gmx.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=superm1@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox