From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796207012; b=mJjwxQRCagz/tPlyFJy6JH0s0AsWvf2DEpCisHyYcQUxIusAWNi2lHilqHbhCGd5lLX6 4VrSUrx2bF1z+6dmNl9WPv2Nn6qxjdyvwz4KsFvsa1TOKpAtfQy1I+YcHB+fUyn0OzWEx aK7wJ8NPDAf/apx7GrfVdjV2I2E3tBi3wRXDu3ozpsWZAjVyqAPayY9ueYKTWiwrg17GE +bDi9SIJmtf3/DLUwwGwHEPQGihrV1cze7BmObkZRGAoPVkR9h0LUbI5dXLwnuAH+jRYh b5wKEpSYcIGhBQekRQz02DQRehHKseC+MeYFBdRAoEQPpdyeJXD8F8hoZUMEuP/ygWg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796207012; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=gFgtSgzc3c0Kz2KziojoNVfgLXZPyw+QpGQUc34eNqM=; b=bMK4+7Cngj2vnZy+3TfoAAk8iOaT0ZPs2AOxWGk+yvHJtpyXeTYva936d7/ITI+npG6y Q59fSj5T2zdnXtnA/Tp802LaGSCW5aAzgJ/v60wMAqm6rj1g8awWE6YyDdHnapel2AA80 41tGaiBISWW2pfTN1Eejfp8jiDLIzwPixZo4XRcyrINfnJ7dlUsGj/ddRb3kUsAGGosSu +8xh60x/rb1F2l+nwKFQNMD0RDoicOeyfp0GyokVToGWjBDpxa9VFRwYPkdkbRdRHuNq2 CexkJKjvCSyoZjZUFccTaDE2ZASLCtwUkr3X87ufio9njC4HRFBcTZSrNv9loH79rpw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="eOcK/JI8"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F066606A31A; Wed, 2 Dec 2026 10:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=eOcK/JI8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0DEC1F000C1; Wed, 2 Dec 2026 10:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796207011; bh=gFgtSgzc3c0Kz2KziojoNVfgLXZPyw+QpGQUc34eNqM=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=eOcK/JI8zbHZjETVc0BbqNoYPxRdYfj1pBv31nqWFH4DY45YGXaklcnjg/baA80aR YXpp5v8YqutrIEkto9FLr1/+Iew4B405KV2WLBqdLR0rFvNUEhcbLT9oCUxgriTy/1 dyBGWuzpfEYUEwStepHrW0vz8q5B54AV/gtYb+Q1pjscBpIpS2VLfaQOpcPGFZ/UEy k3yiAIJp0vcxyNfK3e4it1oAVGgYkIUvZWyFcVjU0W7Q3UktOOPuZEUuiv0m5YjTUC za3Aj4FJkFUL2jly8E1b3Q5kRsR4iOjqqjTtvr3FkH33U6w8V7fPEWIFkE49w8Qatm 3NN2K3KTIZSvw== Date: Wed, 2 Dec 2026 12:23:24 +0200 From: Mika Westerberg To: Marco Sousa Cc: lukas@wunner.de, superm1@kernel.org, mika.westerberg@linux.intel.com, linux-usb@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, bhelgaas@google.com, rafael@kernel.org, Shyam-sundar.S-k@amd.com, Alexander.Kovacs@amd.com Subject: Re: [BUG] AMD Strix Point USB4 (1022:150a): mid-s2idle pciehp hot-add causes D3cold->D0 failure and hard hang Message-ID: <20261202102324.GA1056513@thinkpad> References: <20261126064837.GK191152@black.igk.intel.com> <20261130063324.GG953667@black.igk.intel.com> X-Mailing-List: linux-pci@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: Hi, On Tue, Dec 01, 2026 at 11:40:19PM -0800, Marco Sousa wrote: > Hi Lukas, > > On Tue, Dec 01, 2026 at 11:04:14PM +0100, Lukas Wunner wrote: > > On Tue, Dec 01, 2026 at 10:52:45PM +0100, Marco Sousa wrote: > > > - At 9.615 s, GPE 0x1A (\_GPE._L1A) DID fire once (gpe1A counter = 1) > > > when the dock's USB2 hub woke xhci_hcd 0000:c6:00.3 (XHC3), briefly > > > waking 0000:00:01.1 to D0 (9.617 s) and back to D3cold (9.769 s) — > > > about 1 second BEFORE tb_tunnel_pci() activated 0:5 <-> 2:9 (PCI). > > > > In drivers/pci/pcie/portdrv.c, pcie_portdrv_probe() calls > > pm_runtime_set_autosuspend_delay() with 100, which sets the default > > delay to 100 msec before the port can runtime suspend. This can be > > changed from user space via the power/autosuspend_delay_ms knob in > > the PCIe port's sysfs directory. > > > > Does increasing the timeout to > 1 sec avoid the issue? Maybe it > > just takes longer for the tunnel to be established and the PCI adapter > > to see the link go up. > > > > It may be necessary to enforce a higher minimum delay in that case. > > I just tested this on stock 7.3.6-arch1-2 with power/autosuspend_delay_ms > set to 5000 on 0000:00:01.1 (with pci-acpi.c and thunderbolt dyndbg > enabled and my local workaround paused) by hot-unplugging the dock for > ~20 s so everything entered D3cold, then hot-replugging it: > > [329.041949] pcieport 0000:00:01.1: pciehp: Slot(0): Link Down > [329.045050] pcieport 0000:00:01.1: pciehp: Slot(0): Card not present > [329.063469] pcieport 0000:00:01.1: PME: Spurious native interrupt! > [329.165023] pcieport 0000:00:01.1: power state changed by ACPI to D3cold > [329.385055] xhci_hcd 0000:c6:00.3: power state changed by ACPI to D3cold > [347.587035] thunderbolt 0000:c6:00.5: power state changed by ACPI to D3cold > -- replug -- > [367.049141] thunderbolt 0000:c6:00.5: power state changed by ACPI to D0 > [368.549082] thunderbolt 0-2: HP Thunderbolt Dock G4 > [368.933030] xhci_hcd 0000:c6:00.3: power state changed by ACPI to D0 > [369.160038] usb 5-1: new high-speed USB device number 14 using xhci_hcd > [370.193830] thunderbolt 0000:c6:00.5: 0:5 <-> 2:9 (PCI): activating > [370.194462] thunderbolt 0000:c6:00.5: PCIe Down path activation complete > [370.195088] thunderbolt 0000:c6:00.5: PCIe Up path activation complete > > Result with autosuspend_delay_ms=5000: > - 0000:00:01.1 stayed in D3cold the entire time after replug; 0000:01:00.0 > and igc (enp96s0) never enumerated. > - Notably, gpe1A did NOT fire on replug at all (stayed at 1 from early > boot). 0000:c6:00.5 (NHI0) and 0000:c6:00.3 (XHC3) woke from D3cold > directly (they sit behind internal bridge 0000:00:08.3 which stays in > D0), while 0000:00:01.1 (a Root Port itself in D3cold) never woke at > all. > - Also even on boot, relying on autosuspend_delay_ms to bridge an > incidental gpe1A wake from XHC3 would still break for manual boltd > authorization (user taking >5 s) or PCIe-only USB4 devices without a > USB hub. > > Given that Mario confirmed his own Zen 5 system also omits FADT bit 14, > and 0000:00:01.1 never gets a wake event when tb_tunnel_pci() activates > 0:5 <-> 2:9 (PCI) from D3cold: > 1. Would it make sense for drivers/thunderbolt (e.g. tb_tunnel_pci() > when activating a host PCIe tunnel) to pm_request_resume() the linked > PCIe Root Port (already discovered via usb4-host-interface in > tb_acpi_add_link())? It should really wake up when the PCIE tunnel is established (through PME). As long as the root port/downstream port is marked with ACPI _DSD HotPlugSupportInD3, and I think this is requirement for the TB/USB4 tunneled PCIe ports.