From: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Cc: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"kwilczynski@kernel.org" <kwilczynski@kernel.org>,
"mani@kernel.org" <mani@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] PCI: rzg3s-host: Fix NVMe resume errors after s2idle
Date: Wed, 28 Oct 2026 22:05:32 +0000 [thread overview]
Message-ID: <OSCPR01MB127691959282E653259A2CC7CD36F2@OSCPR01MB12769.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <179310709974.16692.1197178939539578162.b4-reply@b4>
Hi Manivannan,
>
> On 2026-10-05 11:02 +0000, Ovidiu Panait wrote:
> > On the Renesas RZ/V2H platform, when ASPM is enabled, resuming from
> s2idle
> > with an NVMe SSD connected fails with:
> >
> > nvme nvme0: I/O tag 27 (001b) opcode 0x9 (Admin Cmd) QID 0 timeout,
> reset controller
> > nvme nvme0: Disabling device after reset failure: -19
> >
> > This happens because during s2idle, when ASPM is enabled, nvme_suspend()
> > does not shut the drive down. It leaves it in D0, puts it in its lowest
> > NVMe power state, so that resume only has to restore the previous power
> > state instead of a full reinitialization. This assumes the drive keeps
> > its context over the suspend.
> >
> > However, rzg3s_pcie_suspend_noirq() doesn't take this into account and
> > it always powers down the controller and asserts the controller resets,
> > including PERST#. That resets the drive, and the command the NVMe driver
> > sends on resume never completes.
> >
> > To fix this, similar to the dwc driver, use
> > pci_host_common_d3cold_possible() to check if the controller should be
> > powered down and keep the controller running otherwise. Do this only for
> > s2idle, as deep sleep could power off the SoC and neither the power
> domain
> > nor the driver will restore the controller clocks and resets on resume.
> >
> > Fixes: 7ef502fb35b2 ("PCI: Add Renesas RZ/G3S host controller driver")
> > Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
> > ---
> > Note: this fix depends on the following series:
> > https://lore.kernel.org/all/20261002110935.2004349-1-
> claudiu.beznea@kernel.org/
> >
> > drivers/pci/controller/pcie-rzg3s-host.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/pci/controller/pcie-rzg3s-host.c
> b/drivers/pci/controller/pcie-rzg3s-host.c
> > index eea215818633..9fc1a5a4bed8 100644
> > --- a/drivers/pci/controller/pcie-rzg3s-host.c
> > +++ b/drivers/pci/controller/pcie-rzg3s-host.c
> > @@ -2272,6 +2272,14 @@ static int rzg3s_pcie_probe(struct
> platform_device *pdev)
> > static int rzg3s_pcie_suspend_noirq(struct device *dev)
> > {
> > struct rzg3s_pcie_host *host = dev_get_drvdata(dev);
> > + struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
> > + bool pme_capable;
> > +
> > + if (!pm_suspend_via_firmware() &&
>
> For checking S2R, you need to use:
>
> if (pm_suspend_target_state != PM_SUSPEND_MEM)
>
Will update in v2.
> > + !pci_host_common_d3cold_possible(bridge, &pme_capable)) {
> > + device_set_awake_path(dev);
>
> Why? To keep power domain ON? This is not justified in the commit message.
>
This was added so that the clocks are not turned off by the PM domain.
I'll add a note in the commit message for this in v2.
Thanks,
Ovidiu
> - Mani
>
prev parent reply other threads:[~2026-10-28 22:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 11:02 Ovidiu Panait
2026-10-19 12:28 ` claudiu beznea
2026-10-27 13:18 ` Manivannan Sadhasivam
2026-10-28 22:05 ` Ovidiu Panait [this message]
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=OSCPR01MB127691959282E653259A2CC7CD36F2@OSCPR01MB12769.jpnprd01.prod.outlook.com \
--to=ovidiu.panait.rb@renesas.com \
--cc=bhelgaas@google.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=robh@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
all inboxes | Powered by JetHome®