Devicetree
 help / color / mirror / Atom feed
From: Claudiu Beznea <claudiu.beznea+renesas@tuxon.dev>
To: sashiko-reviews@lists.linux.dev
Cc: conor+dt@kernel.org, robh@kernel.org,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>,
	Vincent Mailhol <mailhol@kernel.org>,
	wsa+renesas@sang-engineering.com, devicetree@vger.kernel.org,
	Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH v4 4/7] can: rcar_canfd: Do not set registers selecting the CAN mode
Date: Mon, 7 Sep 2026 15:37:17 +0300	[thread overview]
Message-ID: <4d329d53-eb85-4377-9315-aba0a3183258@tuxon.dev> (raw)
In-Reply-To: <20260902142912.97F9A1F000E9@smtp.kernel.org>



On 9/2/26 17:29, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> 
> New issues:
> - [High] Software state diverges from fixed hardware capabilities due to unvalidated device tree overrides, causing silent data corruption and CAN protocol violations.
> 
> Pre-existing issues:
> - [High] Race condition on write-0-to-clear status register causes lost TX completion interrupts and permanently frozen TX queues.
> --
> 
> commit f5c5dd93cfcd4bdec86a8b0c4bc20cba21d7f4dc
> Author: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> 
> can: rcar_canfd: Do not set registers selecting the CAN mode
> 
> This commit adds a fixed_canfd flag to struct rcar_canfd_hw_info to handle
> hardware like the Renesas RZ/G3S SoC that only supports CAN-FD mode. It skips
> writing to unavailable CAN mode configuration bits during the reset controller
> sequence.
> 
> Link: https://lore.kernel.org/all/1d9719e3-10ff-4cd8-b729-55fea93c37ce@wanadoo.fr
> 
>> diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
>> index 2e84dc5dfa34d..bed7cde1aa01b 100644
>> --- a/drivers/net/can/rcar/rcar_canfd.c
>> +++ b/drivers/net/can/rcar/rcar_canfd.c
> 
> [ ... ]
> 
>> @@ -846,6 +852,9 @@ static int rcar_canfd_reset_controller(struct rcar_canfd_global *gpriv)
>>   		}
>>   
>>   		/* Set the controller into appropriate mode */
>> +		if (gpriv->info->fixed_canfd)
>> +			continue;
>> +
> 
> [Severity: High]
> Does bypassing the hardware mode setup here create a state mismatch if
> the software interface is forced into Classical CAN mode?
> 
> If the device tree contains the "renesas,no-can-fd" property, the probe
> function sets fdmode = false in rcar_canfd_probe():

It is the same thing here. The "renesas-no-can-fd" was forbidden for RZ/G3S.


  reply	other threads:[~2026-09-07 12:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 14:15 [PATCH v4 0/7] can: rcar_canfd: Add support for Renesas RZ/G3S Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 1/7] dt-bindings: can: renesas,rcar-canfd: Document RZ/G3S SoC Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 2/7] can: rcar_canfd: Fix typos in macro names Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 3/7] can: rcar_canfd: Allow the CAN FD clock to be sourced from fck Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 4/7] can: rcar_canfd: Do not set registers selecting the CAN mode Claudiu Beznea
2026-09-02 14:29   ` sashiko-bot
2026-09-07 12:37     ` Claudiu Beznea [this message]
2026-09-02 14:15 ` [PATCH v4 5/7] can: rcar_canfd: Add support for Renesas RZ/G3S Claudiu Beznea
2026-09-02 14:30   ` sashiko-bot
2026-09-07 12:32     ` Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 6/7] arm64: dts: renesas: r9a08g045: Add CAN-FD node Claudiu Beznea
2026-09-02 14:15 ` [PATCH v4 7/7] arm64: dts: renesas: rzg3s-smarc: Enable CAN-FD Claudiu Beznea

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=4d329d53-eb85-4377-9315-aba0a3183258@tuxon.dev \
    --to=claudiu.beznea+renesas@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=o.rempel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=socketcan@hartkopp.net \
    --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