From: sashiko-bot@kernel.org
To: "David Oberhollenzer" <david.oberhollenzer@sigma-star.at>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
linux-phy@lists.infradead.org, neil.armstrong@linaro.org,
vkoul@kernel.org, olteanv@gmail.com
Subject: Re: [PATCH v3 2/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode
Date: Sat, 05 Sep 2026 21:23:10 +0000 [thread overview]
Message-ID: <20260905212310.B4D081F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260905211555.15944-3-david.oberhollenzer@sigma-star.at>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The driver improperly handles errors from `syscon_regmap_lookup_by_phandle_args()`, breaking probe deferral and masking failure states.
--
commit 222aba3021868be395b0b2808f4e70dc057987a7
Author: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode
For the PCIe PHYs, read the property from the device tree and
update the RX/TX mode selection bits in the specified syscon
register.
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index b5543b5c674c8..bc02010dadb74 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
[ ... ]
> @@ -785,6 +788,24 @@ static int ti_pipe3_get_pll_base(struct ti_pipe3 *phy)
> return PTR_ERR_OR_ZERO(phy->pll_ctrl_base);
> }
>
> +static int ti_pipe3_acspcie_tx_rx_mode(struct ti_pipe3 *phy)
> +{
> + struct device_node *np = phy->dev->of_node;
> + struct regmap *regmap;
> + unsigned int args[2];
> +
> + regmap = syscon_regmap_lookup_by_phandle_args(np,
> + "ti,syscon-acspcie-tx-rx",
> + 2, args);
> + if (IS_ERR(regmap)) {
> + dev_warn(phy->dev, "can't get ti,syscon-acspcie-tx-rx\n");
> + return -EINVAL;
[Severity: High]
Does this mask the original error code (such as -EPROBE_DEFER or -ENOENT)
from syscon_regmap_lookup_by_phandle_args() by returning a hardcoded
-EINVAL? Unconditionally logging a warning and returning -EINVAL could
break probe deferral if the syscon device probes later.
> + }
> +
> + return regmap_update_bits(regmap, args[0], PCIE_TX_RX_CTRL_MASK,
> + args[1] << PCIE_TX_RX_CTRL_SHIFT);
> +}
> +
> static int ti_pipe3_probe(struct platform_device *pdev)
> {
> struct ti_pipe3 *phy;
> @@ -807,6 +828,12 @@ static int ti_pipe3_probe(struct platform_device *pdev)
> phy->dpll_map = data->dpll_map;
> phy->settings = data->settings;
>
> + if (phy->mode == PIPE3_MODE_PCIE) {
> + ret = ti_pipe3_acspcie_tx_rx_mode(phy);
> + if (ret)
> + dev_warn(dev, "failed to set ACSPCIe TX/RX mode\n");
> + }
> +
> ret = ti_pipe3_get_pll_base(phy);
[Severity: High]
Does this overwrite the returned error code in ret with the result of
ti_pipe3_get_pll_base()? If ti_pipe3_acspcie_tx_rx_mode() failed or
should have been deferred, ignoring the error here causes the probe
function to falsely succeed without configuring the PHY.
> if (ret)
> return ret;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260905211555.15944-1-david.oberhollenzer@sigma-star.at?part=2
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2026-09-05 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-05 21:15 [PATCH v3 0/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode David Oberhollenzer
2026-09-05 21:15 ` [PATCH v3 1/2] dt-bindings: phy: ti,phy-usb3: Add aspcie reference clock setting David Oberhollenzer
2026-09-09 7:36 ` Krzysztof Kozlowski
2026-09-05 21:15 ` [PATCH v3 2/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode David Oberhollenzer
2026-09-05 21:23 ` sashiko-bot [this message]
2026-09-09 7:37 ` Krzysztof Kozlowski
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=20260905212310.B4D081F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david.oberhollenzer@sigma-star.at \
--cc=devicetree@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--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