Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "David Oberhollenzer" <david.oberhollenzer@sigma-star.at>
Cc: vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com,
	robh@kernel.org, conor+dt@kernel.org,
	linux-phy@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode
Date: Tue, 04 Aug 2026 11:27:01 +0000	[thread overview]
Message-ID: <20260804112702.497CF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804111849.92046-2-david.oberhollenzer@sigma-star.at>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Probe deferral is broken and errors are masked and ignored when fetching the syscon-acspcie-tx-rx property.
--

--- Patch [1]: [PATCH 1/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode ---
commit 033ddba9bd8c07b8f722ae7d9285da5fbd94d88e
Author: David Oberhollenzer <david.oberhollenzer@sigma-star.at>

phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode

This commit adds a device tree setting to configure the ACSPCIe TX/RX mode
for the OMAP PCIe PHY subsystem. It uses a syscon regmap to apply the
configuration during probe.

> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index b5543b5c674c8..801a6239328e1 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,
> +						      "syscon-acspcie-tx-rx",
> +						      2, args);
> +	if (IS_ERR(regmap)) {
> +		dev_warn(phy->dev, "can't get syscon-acspcie-tx-rx\n");
> +		return -EINVAL;

[Severity: High]
Does this code inadvertently break probe deferral?

If the syscon provider is not yet ready, syscon_regmap_lookup_by_phandle_args()
will return -EPROBE_DEFER. Masking this actual error code into -EINVAL could
prevent the driver from probing 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]
Is it intentional that the error returned from ti_pipe3_acspcie_tx_rx_mode()
is ignored?

The value of ret is captured but immediately overwritten by
ti_pipe3_get_pll_base(). This causes the probe to proceed even if the syscon
lookup fails or requires deferral.

>  	if (ret)
>  		return ret;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260804111849.92046-1-david.oberhollenzer@sigma-star.at?part=1

  reply	other threads:[~2026-08-04 11:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 11:18 [PATCH 0/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode David Oberhollenzer
2026-08-04 11:18 ` [PATCH 1/2] " David Oberhollenzer
2026-08-04 11:27   ` sashiko-bot [this message]
2026-08-05  7:26     ` David Oberhollenzer
2026-08-04 11:18 ` [PATCH 2/2] dt-bindings: phy: ti,phy-usb3: document aspcie reference clock setting David Oberhollenzer
2026-08-04 11:29   ` sashiko-bot
2026-08-05  7:39   ` Krzysztof Kozlowski
2026-08-05  8:42     ` David Oberhollenzer
2026-08-05  9:47       ` 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=20260804112702.497CF1F000E9@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