From: sashiko-bot@kernel.org
To: "Hongyang Zhao" <hongyang.zhao@thundersoft.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2] arm64: dts: qcom: kodiak: Move PCIe GPIOs and PHYs to root ports
Date: Sun, 07 Jun 2026 05:48:54 +0000 [thread overview]
Message-ID: <20260607054854.705991F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260607-rubikpi-bugfix-next-20260605-v2-1-7bf229978bcd@thundersoft.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Pre-existing bug in the legacy fallback parsing of the Qualcomm PCIe driver where a devm-managed GPIO request causes an -EBUSY failure.
--
commit a43564541de23d343c5f9c38e89cac6a69d3e6e1
Author: Hongyang Zhao <hongyang.zhao@thundersoft.com>
arm64: dts: qcom: kodiak: Move PCIe GPIOs and PHYs to root ports
This commit moves the PCIe PHY and GPIO references from the host bridge to
the root ports for Kodiak devices. It aligns the device trees with the new
Qualcomm PCIe bindings where perst-gpios becomes reset-gpios on the root
port.
> The Qualcomm PCIe binding deprecates perst-gpios and wake-gpios
> on the host bridge and expects board reset and wake GPIOs to be
> described on the root port. PERST# is described there as
> reset-gpios.
>
> Move the PCIe PHY references in kodiak.dtsi to the PCIe0 and PCIe1
> root port nodes, and move the board-specific PCIe reset and wake
> GPIOs in the Kodiak DTs to the corresponding root ports.
>
> Keep the PHY and GPIO resources on the same root port nodes so the
> Qualcomm PCIe driver can parse the root port binding instead of
> falling back to the legacy host bridge GPIO parsing.
[Severity: High]
This isn't a bug introduced by this patch, but looking at the fallback
to the legacy host bridge GPIO parsing mentioned here, is there a
resource leak in the driver's fallback mechanics?
In drivers/pci/controller/dwc/pcie-qcom.c:qcom_pcie_parse_ports(), the
driver requests the perst GPIO exclusively:
qcom_pcie_parse_ports() {
...
pcie->reset = devm_gpiod_get_optional(dev, "perst",
GPIOD_OUT_HIGH);
...
}
If it fails to parse the child port nodes, it returns -ENODEV and jumps
to err_port_del:
err_port_del:
list_for_each_entry_safe(port, tmp_port, &pcie->ports, list) {
...
However, it does not free the devm-allocated perst GPIO before returning.
When probe catches the -ENODEV and falls back to
qcom_pcie_parse_legacy_binding(), it tries to acquire the exact same GPIO:
qcom_pcie_parse_legacy_binding() {
...
reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH);
if (IS_ERR(reset))
return PTR_ERR(reset);
...
}
Will this second request fail with -EBUSY and cause a regression for
existing boards running legacy device trees?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260607-rubikpi-bugfix-next-20260605-v2-1-7bf229978bcd@thundersoft.com?part=1
next prev parent reply other threads:[~2026-06-07 5:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 4:17 [PATCH v2] arm64: dts: qcom: kodiak: Move PCIe GPIOs and PHYs to root ports Hongyang Zhao
2026-06-07 5:48 ` sashiko-bot [this message]
2026-06-07 7:50 ` Dmitry Baryshkov
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=20260607054854.705991F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hongyang.zhao@thundersoft.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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