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=1796296280; b=mblV6cmUA8mjs2oJEO/96HlhOkAYy169A/a7vUshpntqd9nBrPpdVZGajUpUyh4gdFkw K0Lz5yZde6KcJi347dFCneYU1zIFkC5p7sDjmNEz0oyHu6oDyalT6XHMrkpvJImMMgIeH pXNs/hwVDZGN+v8j/2avUGjyNy6Vm67Ow0+94DWsGqgTnTzCvDx1WVncO1kiXOoywvnpW YMBHTvnnboNexHwwWyUMWFzQFLM9++HzastOfKAtI5NGrwBMmSKRESUexS63ZSb/V2rgy y8Pjh0nVux6Nl7NLuhZ7uc5M+uHc3ZHYSfnsItnjVXhnNcQtfm87Cc3W/6fvgEa7Tow== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796296280; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=N9cJnMZ/2XPe8lYvQVOzAfepuYBQh7MW9n4bcZC3XB8=; b=XCbRPaeWfGLU6z5G8BPW5dhhoD6BzFS4/9bpXHY4vO59gvyA7jhE2q6v1uIHzfHXrkUn n8pKTWwnU3nZkcP0vYE7NeLJskZyEAvXXWCtcEIjOXqQIAstMnV5UIl+4eVFIV5z1HFMx KP/GBX18HSaB2o2YAINEWSm/+o+7XNRscZWd/2VckhY5YjJs62vc5lK0VHpb29vco7AyI MrVLPYUzwv9OHydFU+Re3uCbsYxKY/66kdjcx0SsD8ztQb+7nFcbiJIdcAZHFYwbQE1Ss 11YdffOyy2Qd8HEzjNHyAJwjGNO2B8acHB8koihY8jYoW8zXf9cD9WV01obOuK9EzNQ== 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=SE7xoBSp; 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 ED9C7606A322 for ; Thu, 3 Dec 2026 11:11:19 +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=SE7xoBSp Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78B431F00893; Thu, 3 Dec 2026 11:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796296279; bh=N9cJnMZ/2XPe8lYvQVOzAfepuYBQh7MW9n4bcZC3XB8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=SE7xoBSpNNKKTrFbjP83+78Vr72J4zwlyZKoop/4yAYU2qenPEgz1jN30/CY8CUKD FgY9FKjr4cVaUoARg2Ufr1/7wkeP3wnFBowfLIV4PWu+Z/iyIDA6kRacPi6wrM82Ww C4K108zn2OIQeDxo8fuO7M3HWHSGacuQytV3rlp0gCT0gm0/5ENCJU4T+Kimj0SZyR 0Pow4C7u9pgAeHZTjKz01TBEYe7OHTnlt6N3eaf/7Ro65iLjoX51MeUL6iS+f5Cm8h xLFBlTTQFdL2JpA2SAIGFr6gKspqY1kainzuu4mZc56RHwpnBeY4Vf9GQtnrxVszP2 GmDbRl95a5FOQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 6/6] PCI: rzg3s-host: Fix NVMe resume errors after s2idle Reply-To: sashiko-reviews@lists.linux.dev To: "Claudiu Beznea" Cc: linux-pci@vger.kernel.org, wsa+renesas@sang-engineering.com In-Reply-To: <20261203093224.247349-7-claudiu.beznea@kernel.org> References: <20261203093224.247349-1-claudiu.beznea@kernel.org> <20261203093224.247349-7-claudiu.beznea@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 11:11:19 +0000 X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] PCI: rzg3s-host: missing select PCI_HOST_COMMON causes link failure - [High] PCI: rzg3s-host: s2idle awake path triggers MSTOP via rzg2l_cpg_resume() -- commit 7fbedf2fb7e05ca948fe32fe8ee79c121d940a34 Author: Ovidiu Panait PCI: rzg3s-host: Fix NVMe resume errors after s2idle This commit skips powering down and reinitializing the PCIe host controller across s2idle when D3cold is not possible, keeping its PM domain clocks active via device_set_awake_path() and tracking the suspend state in host->suspended. > diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/contr= oller/pcie-rzg3s-host.c > index ad75e68952590..67a338cece3e2 100644 > --- a/drivers/pci/controller/pcie-rzg3s-host.c > +++ b/drivers/pci/controller/pcie-rzg3s-host.c [ ... ] > @@ -1936,11 +1939,19 @@ static int rzg3s_pcie_probe(struct platform_devic= e *pdev) > static int rzg3s_pcie_suspend_noirq(struct device *dev) > { > struct rzg3s_pcie_host *host =3D dev_get_drvdata(dev); > + struct pci_host_bridge *bridge =3D pci_host_bridge_from_priv(host); > const struct rzg3s_pcie_soc_data *data =3D host->data; > struct rzg3s_pcie_port *port =3D &host->port; > struct rzg3s_sysc *sysc =3D host->sysc; > + bool pme_capable; > int ret; > =20 > + if (pm_suspend_target_state =3D=3D PM_SUSPEND_TO_IDLE && > + !pci_host_common_d3cold_possible(bridge, &pme_capable)) { > + device_set_awake_path(dev); > + return 0; > + } [Severity: High] Does this fail to link vmlinux when CONFIG_PCI_HOST_COMMON is not built in? pci_host_common_d3cold_possible() is a non-inline function in drivers/pci/controller/pci-host-common.c, while CONFIG_PCIE_RENESAS_RZG3S_HOST is bool and does not select PCI_HOST_COMMON. When CONFIG_PCI_HOST_COMMON is n or m (for example when CONFIG_PCI_HOST_GENERIC=3Dm is the only selector), linking fails with an undefined reference to pci_host_common_d3cold_possible(). Adding "select PCI_HOST_COMMON" to PCIE_RENESAS_RZG3S_HOST would fix this. [ ... ] > @@ -1984,6 +1997,9 @@ static int rzg3s_pcie_resume_noirq(struct device *d= ev) > struct rzg3s_sysc *sysc =3D host->sysc; > int ret; > =20 > + if (!host->suspended) > + return 0; [Severity: High] Can skipping suspend on s2idle leave the PCIe controller hardware-stopped in MSTOP after resume on RZ/G3S and RZ/G3L? On RZ/G3S and RZ/G3L (rzg2l-cpg.c), pci_aclk shares its MSTOP bit with pci_clkl1pm, which is in no_pm_mod_clks and remains disabled. With device_set_awake_path(dev) set, genpd_finish_suspend() skips pm_clk_suspend(), leaving pci_aclk enabled and mstop->usecnt nonzero. On s2idle resume, rzg2l_cpg_resume() calls rzg2l_mod_enable_crit_clock_init_mstop() -> rzg2l_mod_clock_init_mstop_helper() for every module clock. Seeing the disabled pci_clkl1pm, it calls rzg2l_mod_clock_module_set_state(clk, true): drivers/clk/renesas/rzg2l-cpg.c:rzg2l_mod_clock_module_set_state() { ... /* Allow updates on probe when usecnt =3D 0. */ if (!atomic_read(&mstop->usecnt)) update =3D true; else update =3D atomic_dec_and_test(&mstop->usecnt); ... } This decrements the shared mstop->usecnt to 0 (on the first s2idle resume on RZ/G3S, or the second on RZ/G3L) and asserts MSTOP. Because genpd_finish_resume() skips pm_clk_resume() and rzg3s_pcie_resume_noirq() returns early, the controller stays stopped when NVMe resumes. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203093224.2473= 49-1-claudiu.beznea@kernel.org?part=3D6