Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Cc: robh@kernel.org, wsa+renesas@sang-engineering.com,
	devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v4 09/10] dt-bindings: net: renesas,etheravb: Add optional gPTP phandle for Gen4
Date: Thu, 10 Sep 2026 17:31:42 +0000	[thread overview]
Message-ID: <20260910173142.C1F6B1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260909173027.2201560-10-niklas.soderlund+renesas@ragnatech.se>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Fatal error propagation from ptp_clock_register() breaks Ethernet TX timeout recovery and ring parameter updates.
--

commit c3fb74adfa830cee3ff5a146680ac62339b2b230
Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

dt-bindings: net: renesas,etheravb: Add optional gPTP phandle for Gen4

This commit adds an optional ptp-timer property for the RAVB module on Gen4,
allowing the driver to find and use an external system-wide gPTP clock.
The clock is shared with RTSN on V4H and RSWITCH on S4. The module can
function without it, but will not provide PTP functionality in such cases.

> diff --git a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> index 1e00ef5b3acda..fad002492421a 100644
> --- a/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> +++ b/Documentation/devicetree/bindings/net/renesas,etheravb.yaml
> @@ -97,6 +97,8 @@ properties:
>  
>    phy-handle: true
>  
> +  ptp-timer: true
> +

[Severity: High]
If this PTP timer is optional, could this introduce a regression where its
absence causes the driver to fail during initialization or timeout recovery?

Looking at ravb_ptp_init() in drivers/net/ethernet/renesas/ravb_ptp.c,
it propagates a fatal error if PTP registration fails:

drivers/net/ethernet/renesas/ravb_ptp.c:ravb_ptp_init() {
    priv->ptp.clock = ptp_clock_register(&priv->ptp.info, &priv->pdev->dev);
    if (IS_ERR(priv->ptp.clock)) {
        ret = PTR_ERR(priv->ptp.clock);
        priv->ptp.clock = NULL;
        ravb_ptp_stop(ndev);
    }
    return ret;
}

This error returns up the call chain through ravb_dmac_init() to
ravb_tx_timeout_work() in drivers/net/ethernet/renesas/ravb_main.c:

drivers/net/ethernet/renesas/ravb_main.c:ravb_tx_timeout_work() {
    error = ravb_dmac_init(ndev);
    if (error) {
        netdev_err(ndev, "%s: ravb_dmac_init() failed, error %d\n",
                   __func__, error);
        goto out_unlock;
    }
}

Could this cause the main Ethernet interface to become permanently disabled
on a TX timeout if the optional PTP clock fails to register?

Similarly, in ravb_set_ringparam(), an error from ravb_dmac_init() interrupts
the ring parameter update:

drivers/net/ethernet/renesas/ravb_main.c:ravb_set_ringparam() {
    error = ravb_dmac_init(ndev);
    if (error) {
        netdev_err(ndev,
                   "%s: ravb_dmac_init() failed, error %d\n",
                   __func__, error);
        return error;
    }
}

Would this leave the network device detached when applying ring parameters
if the PTP clock is absent?

>    '#address-cells':
>      description: Number of address cells for the MDIO bus.
>      const: 1

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260909173027.2201560-1-niklas.soderlund+renesas@ragnatech.se?part=9

  reply	other threads:[~2026-09-10 17:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 17:30 [PATCH net-next v4 00/10] ravb: Add gPTP support for Gen4 Niklas Söderlund
2026-09-09 17:30 ` [PATCH net-next v4 01/10] net: ethernet: ravb: Remove gPTP control from WoL setup and restore Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 02/10] net: ethernet: ravb: Move programming of gPTP timer interval Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 03/10] net: ethernet: ravb: Simplify gPTP start and stop Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 04/10] net: ethernet: ravb: Remove redundant argument to ravb_ptp_init() Niklas Söderlund
2026-09-09 17:30 ` [PATCH net-next v4 05/10] net: ethernet: ravb: Propagate error from ptp_clock_register() Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 06/10] net: ethernet: ravb: Replace gPTP flags with callbacks Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 07/10] net: ethernet: ravb: Add callback for gPTP probe Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot
2026-09-09 17:30 ` [PATCH net-next v4 08/10] net: ethernet: ravb: Add callback for gPTP clock index Niklas Söderlund
2026-09-09 17:30 ` [PATCH net-next v4 09/10] dt-bindings: net: renesas,etheravb: Add optional gPTP phandle for Gen4 Niklas Söderlund
2026-09-10 17:31   ` sashiko-bot [this message]
2026-09-09 17:30 ` [PATCH net-next v4 10/10] net: ethernet: ravb: Add gPTP support " Niklas Söderlund
2026-09-10 17:31   ` 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=20260910173142.C1F6B1F00898@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /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