From: sashiko-bot@kernel.org
To: "Jagadeesh Kona" <jagadeesh.kona@oss.qualcomm.com>
Cc: linux-clk@vger.kernel.org, linux-usb@vger.kernel.org,
linux-phy@lists.infradead.org, linux-pci@vger.kernel.org,
vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
Date: Thu, 26 Nov 2026 19:18:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-236076@kernel.org> (raw)
In-Reply-To: <20261127-usb-pcie-gdsc-suspend-v1-5-485a08ffdc6f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] usb: dwc3: qcom: GenPD hwmode not reset in dwc3_qcom_resume()
or remove
--
commit 497ba54c561a27a707fe8980a8ab1233948ec270
Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend
This commit toggles GenPD hardware mode in dwc3_qcom_suspend() so the USB
GDSC stays powered during host-mode wakeup suspend and turns off otherwise.
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 5a68025ccea5e..99dce28dda065 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
[ ... ]
> @@ -391,6 +392,9 @@ static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup)
> for (i = 0; i < qcom->num_ports; i++)
> qcom->ports[i].usb2_speed = dwc3_qcom_read_usb2_speed(qcom, i);
> dwc3_qcom_enable_interrupts(qcom);
> + dev_pm_genpd_set_hwmode(qcom->dev, true);
> + } else {
> + dev_pm_genpd_set_hwmode(qcom->dev, false);
> }
>
> qcom->is_suspended = true;
[Severity: Medium]
Should dwc3_qcom_resume() also reset dev_pm_genpd_set_hwmode(qcom->dev,
false)?
Once a host-mode suspend enables hwmode (setting sc->hw_stay_on = true in
the GDSC), dwc3_qcom_resume() leaves it enabled while the controller is
active. If the driver is later unbound or unloaded, dwc3_qcom_remove()
resumes the device and detaches from GenPD without calling
dwc3_qcom_suspend(), so gdsc_disable() sees sc->hw_stay_on set and leaves
the GDSC powered on in hardware. If the driver is then re-probed,
genpd_add_device() reinitializes dev_gpd_data(dev)->hw_mode to false while
sc->hw_stay_on remains true, causing future dev_pm_genpd_set_hwmode(dev,
false) calls to short-circuit.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-usb-pcie-gdsc-suspend-v1-0-485a08ffdc6f@oss.qualcomm.com?part=5
next prev parent reply other threads:[~2026-11-26 19:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 18:57 [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 1/8] clk: qcom: gdsc: Use GenPD hwmode to keep GDSC " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 2/8] clk: qcom: gcc-glymur: Register set_hwmode_dev callback for USB, PCIe GDSCs Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 3/8] clk: qcom: gcc-qcs615: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 4/8] clk: qcom: gcc-shikra: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 5/8] usb: dwc3: qcom: Add support to keep GDSC On during host mode bus suspend Jagadeesh Kona
2026-11-26 19:18 ` sashiko-bot [this message]
2026-11-26 18:57 ` [PATCH 6/8] phy: qcom: combo: Keep the PHY GDSC ON during host " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 7/8] phy: qcom: usb: " Jagadeesh Kona
2026-11-26 18:57 ` [PATCH 8/8] PCI: qcom: Keep GDSC enabled during non-D3cold suspend Jagadeesh Kona
2026-11-26 19:21 ` [PATCH 0/8] clk: qcom: gdsc: Allow USB and PCIe GDSCs to stay enabled across suspend sashiko-bot
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=sashiko-outbox-236076@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jagadeesh.kona@oss.qualcomm.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@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