From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.12 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796318894; b=v8FDGAgbt3hc4UcWG76Hos2eStpUj5xFDDqD5m3mkjgT/mvfIRCU9tzEV1BgboNi3UHr 8s7KV/ERsbWZakeBFdsxRhnb8cClxVmpg+ugfPs/PkuN3wqqq6G3huIMXpQu/YfL1UOKo t+GYr7767bY+Qg+PSLGdUkUky/G76V7QlD7xYnmmfM88xoXNvO/IxR4lrFhIYXOdH8BPh Ss3xP5DVAxuTrw3fnvLTny3xldNox42e4N8ClM25aRL5O0loqzxozD2yDn0VbkwUJtSVp JhEqHXmdBbS3BTotqlQ2uNopvz+qKOpvzWS50C/XBzH9Gtn+0+qhuaSXdujz6INbbPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796318894; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=64cpH8ULeEtJ3AgHaVyFwWaJi6Z2MsH3h/+MDDOwOuQ=; b=FwyHu/5XW8L+RIH5CHA/c/4eIhhPEy4jrRcCPh9JDVNhkBw+tK96GhSMGRVqai7xOiTy PA3ZE7CrNsPRHo+W1nN+im3AB5uRnl7L1N6MI3ibRI8eNveb203l7uyG+ohzDBMAeZ+IY rR1GbcRMHGO4rbuvq5qRFjPw6bkTLxbs1UF83hAGmTMnOAdy279VmTnqzRXQBn+OCYo8r IuPCP7TB5bL4mKC50qb1mw7UFCO4BRrRHOWF/f/wHDPU22Qny+RuDIYmrgifquKIaoBJ4 we265wdAlFiQNmei2LQ6gJeUi5CKaO1q4MBjMdmuZKbEotE1Fn//MlOuTf7lWRqD/oA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=RYK5KiC2; arc=none smtp.remote-ip=192.198.163.12 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13987606A322 for ; Thu, 3 Dec 2026 17:28:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 13987606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=RYK5KiC2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796318894; x=1827854894; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=64cpH8ULeEtJ3AgHaVyFwWaJi6Z2MsH3h/+MDDOwOuQ=; b=RYK5KiC2OirqSo4G/sz3L47mba1eEHMIhpxZia/kcY6aYUZSCWLX5qtP I3CMgvWJk7upizAfzbePwNB5Qyvfn3f2LQFWgGfgIyMDniHUiHwionTsH EEREpvhyJTJ4+LEM7i3iVaMQPSaFVg5TDUXq1HB5XWPPPxvNsBh6dVGXJ 9VYjB4MDllhIYVZdB8uXL0E/crmhQTU6hMSyely5fSL6CFOrzyTMnQ5Ju DNkZ6S55tQpHzMGpJMnBAAVxZ7HPhQab82U8NRIuz4ytlCnGpYoeK2sQ+ WtYkfoGXYrmh5sItpNMKyr7Bnj/bC5zWkqfpgZgz5BFLh7HoYWCZ39y0F g==; X-CSE-ConnectionGUID: YBv3f+NIQYCks6FdUgDCXA== X-CSE-MsgGUID: gOsrJt/dRT2Y9aNze8gleg== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5191512" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5191512" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:28:12 -0800 X-CSE-ConnectionGUID: /QpsQ4veQmO0SnLH+fLqIg== X-CSE-MsgGUID: Ediv2He0Ti+gOf9uCksKww== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="13898844" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa007.jf.intel.com with ESMTP; 03 Dec 2026 09:28:11 -0800 Received: by black.igk.intel.com (Postfix, from userid 1001) id A344498; Thu, 03 Dec 2026 18:28:10 +0100 (CET) Date: Thu, 3 Dec 2026 18:28:10 +0100 From: Mika Westerberg To: Achim =?utf-8?Q?L=C3=B6bbert?= Cc: Mario Limonciello , linux-usb@vger.kernel.org Subject: Re: [REGRESSION/BUG] thunderbolt: ASM4242 fails to restore DP tunnel after resume on Ryzen 8700G (7.4-rc4) Message-ID: <20261203172810.GB953667@black.igk.intel.com> References: <20261203142832.GA953667@black.igk.intel.com> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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.