lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f138742fe92b6d26f0cd87d3c57e141d63c6f3b.camel@pengutronix.de>
Date: Wed, 13 Aug 2025 10:17:52 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Marc Kleine-Budde <mkl@...gutronix.de>, Chandrasekar Ramakrishnan
 <rcsekar@...sung.com>, Vincent Mailhol <mailhol.vincent@...adoo.fr>, Patrik
 Flykt <patrik.flykt@...ux.intel.com>, Dong Aisheng <b29396@...escale.com>,
 Fengguang Wu <fengguang.wu@...el.com>, Varka Bhadram
 <varkabhadram@...il.com>, Wu Bo <wubo.oduw@...il.com>, Markus
 Schneider-Pargmann <msp@...libre.com>
Cc: linux-can@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel@...gutronix.de
Subject: Re: [PATCH 7/7] can: m_can: add optional support for reset

On Di, 2025-08-12 at 19:36 +0200, Marc Kleine-Budde wrote:
> In some SoCs (observed on the STM32MP15) the M_CAN IP core keeps the
> CAN state and CAN error counters over an internal reset cycle. The
> STM32MP15 SoC provides an external reset, which is shared between both
> M_CAN cores.
> 
> Add support for an optional external reset. Take care of shared
> resets, de-assert reset during the probe phase in
> m_can_class_register() and while the interface is up, assert the reset
> otherwise.
>
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
> ---
>  drivers/net/can/m_can/m_can.c | 26 +++++++++++++++++++++++---
>  drivers/net/can/m_can/m_can.h |  1 +
>  2 files changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index c24ea0e5599f..0a6d4b523c33 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -23,6 +23,7 @@
>  #include <linux/pinctrl/consumer.h>
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
> +#include <linux/reset.h>
>  
>  #include "m_can.h"
>  
> @@ -1833,6 +1834,7 @@ static int m_can_close(struct net_device *dev)
>  
>  	close_candev(dev);
>  
> +	reset_control_assert(cdev->rsts);

Nitpick, "rsts" as in plural? 

[...]
> @@ -2462,8 +2478,10 @@ int m_can_class_register(struct m_can_classdev *cdev)
>  		 KBUILD_MODNAME, cdev->net->irq, cdev->version);
>  
>  	/* Probe finished
> -	 * Stop clocks. They will be reactivated once the M_CAN device is opened
> +	 * Assert rest and stop clocks.

Typo, s/rest/reset/.

Otherwise,


Reviewed-by: Philipp Zabel <p.zabel@...gutronix.de>

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ