From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19988606A686 for ; Tue, 1 Dec 2026 07:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AmvmyyOx; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=TqTXXJjD DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=tjbJUaGqXmMCbwWYjEymxvjm3pS0wVLe6KKn7cMhpho=; b=AmvmyyOxG/m7R3EoUZyMfUJTOO ZpoOrBUygo+LK9Zgn7HOllM20MKAhlgZHAfxkJvWN+wgblvsiADx0Mio8XxaMrAmBG57s6z12GA4O CxGrz1bpCOyJtQtP2DZKunqbCxL7WMI8akvVPloEq+7q/Q/1YHy9AF3iOCkJU839XqooGG+22Q9b2 kOenwzSYdfIHelTtCr3lzjM4303qArsALYcLEq543kimDRn9ukvo1Q9Ss7Y54Ig1O6qw/YMlqky+p 43uU1g5C6/ccsXCgpUIV2z7pFDE/bvsjuC+BJk089JceKv/yxUvkLhfYtUnPU3Ce3ncWQlzeE3JcD /4UiS5SA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYIc1-00000006wLb-3QNf; Tue, 01 Dec 2026 07:49:17 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYIbt-00000006wKp-2UTz for linux-phy@lists.infradead.org; Tue, 01 Dec 2026 07:49:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796111350; x=1827647350; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5A5CuIIyzcQBiL8hUM2so+5AbLwwx1PfCcPL8D/bn1U=; b=TqTXXJjDdYQ6ZXUU99KUG7nMhVANjyrEtaCklr8WbyJ52XUh8ODBViym UHSjTdhLAEYpueygyN9OSRDRhsTQl9Uzk8yeJY2iGw0eJtRvhNyT73vDf PTjaBXMG7xBcXgaf39kiJ6RCf5upizhtonXFbossRfWNbDWKlQuve4us+ Gxie72gTfKdsUBu0jWx8cNSpOZ2s9+MvMFpZJKG+pTZ4hnFi92mgXpDpj /WUgN5r9GV4TzAHeoppLJKKtPEr84jNEN7eJv9N4MT/10YIWmPn6UD/++ cR2OXEc2YSt3ujRbPzAeFn4qwwPaW46vq8qrYkkR8PtzRYy9gMs1mo9ev Q==; X-CSE-ConnectionGUID: KDclo+/wS1asG2yIUJVh6A== X-CSE-MsgGUID: r3gzeoOqQWu9gVkzVtERcg== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4879629" X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="4879629" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 23:49:09 -0800 X-CSE-ConnectionGUID: EnBNjnDZRFyNWbN6ZZ1l0w== X-CSE-MsgGUID: DKHezaKcQe+mQ8V7PcH6Xg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,244,1787036400"; d="scan'208";a="13464167" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa008.fm.intel.com with ESMTP; 30 Nov 2026 23:49:04 -0800 Received: by black.igk.intel.com (Postfix, from userid 1001) id 9B5A898; Tue, 01 Dec 2026 08:49:02 +0100 (CET) Date: Tue, 1 Dec 2026 08:49:02 +0100 From: Mika Westerberg To: Konrad Dybcio Cc: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Stephen Boyd , Brian Masney , Jerome Brunet , Andreas Noever , Mika Westerberg , Yehezkel Bernat , Mario Limonciello , Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, usb4-upstream@oss.qualcomm.com Subject: Re: [PATCH RFC DNM 10/15] thunderbolt: nhi: Resume a runtime suspended NHI for system suspend Message-ID: <20261201074902.GU953667@black.igk.intel.com> References: <20261124-topic-next-20261116-fsm-mvp-v1-0-a9b45c69cd38@oss.qualcomm.com> <20261124-topic-next-20261116-fsm-mvp-v1-10-a9b45c69cd38@oss.qualcomm.com> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261124-topic-next-20261116-fsm-mvp-v1-10-a9b45c69cd38@oss.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_234909_705600_0084C39D X-CRM114-Status: GOOD ( 21.93 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On Tue, Nov 24, 2026 at 09:01:39PM +0100, Konrad Dybcio wrote: > The PCI core resumes a runtime suspended device in pci_pm_suspend() > before calling the driver's suspend callback, so nhi_suspend_noirq() > always finds the NHI active. Platform devices get no such treatment, so > these runtime suspended NHIs gets suspended a second time in the > noirq phase and resumed in nhi_resume_noirq(). nhi_complete() then still > sees it as runtime suspended and resumes it once more, which corrupts > the control channel (RX checksum mismatches, config space timeouts). > > Resume the NHI at the beginning of nhi_suspend(), like the PCI core > does as a workaround. Okay but I would rather keep it suspended over the system sleep. There is no difference from USB4 perspective so there is really no point waking it up. IIRC we do that now because USB stack needs to re-configure wakes for S3 but for s2idle (which is what the modern Intel systems at least do) that should not be necessary - it should wake the same way as runtime suspended. > Signed-off-by: Konrad Dybcio > --- > drivers/thunderbolt/nhi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c > index e2578740d569a7ee1d5ab22e8effc153cb7d4632..56bc5748b6515b9d4799aa87ce0f72e1d673d634 100644 > --- a/drivers/thunderbolt/nhi.c > +++ b/drivers/thunderbolt/nhi.c > @@ -1258,6 +1258,13 @@ static int nhi_suspend(struct device *dev) > { > struct tb *tb = dev_get_drvdata(dev); > > + /* > + * The noirq callbacks expect the NHI to be active. The PCI core > + * resumes a runtime suspended device before calling this, do the > + * same for the NHIs that are not PCI devices. > + */ > + pm_runtime_resume(dev); > + > return tb_domain_suspend(tb); > } > > > -- > 2.55.0 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy