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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01f901d9053a$f138bdd0$d3aa3970$@samsung.com>
Date:   Thu, 1 Dec 2022 09:40:50 +0530
From:   "Vivek Yadav" <vivek.2311@...sung.com>
To:     "'Marc Kleine-Budde'" <mkl@...gutronix.de>
Cc:     <rcsekar@...sung.com>, <krzysztof.kozlowski+dt@...aro.org>,
        <wg@...ndegger.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <pankaj.dubey@...sung.com>,
        <ravi.patel@...sung.com>, <alim.akhtar@...sung.com>,
        <linux-fsd@...la.com>, <robh+dt@...nel.org>,
        <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-samsung-soc@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <aswani.reddy@...sung.com>, <sriranjani.p@...sung.com>
Subject: RE: RE: [PATCH v3 1/2] can: m_can: Move mram init to mcan device
 setup



> -----Original Message-----
> From: Marc Kleine-Budde <mkl@...gutronix.de>
> Sent: 24 November 2022 20:24
> To: Vivek Yadav <vivek.2311@...sung.com>
> Cc: rcsekar@...sung.com; krzysztof.kozlowski+dt@...aro.org;
> wg@...ndegger.com; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com; pankaj.dubey@...sung.com;
> ravi.patel@...sung.com; alim.akhtar@...sung.com; linux-fsd@...la.com;
> robh+dt@...nel.org; linux-can@...r.kernel.org; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-
> samsung-soc@...r.kernel.org; devicetree@...r.kernel.org;
> aswani.reddy@...sung.com; sriranjani.p@...sung.com
> Subject: Re: RE: [PATCH v3 1/2] can: m_can: Move mram init to mcan device
> setup
> 
> On 24.11.2022 14:36:48, Vivek Yadav wrote:
> > > Why not call the RAM init directly from m_can_chip_config()?
> > >
> > m_can_chip_config function is called from m_can open.
> >
> > Configuring RAM init every time we open the CAN instance is not
> > needed, I think only once during the probe is enough.
> 
> That probably depends on you power management. If I add a regulator to
> power the external tcan4x5x chip and power it up during open(), I need to
> initialize the RAM.
> 
Thanks for the clarification,
There is one doubt for which I need clarity if I add ram init in m_can_chip_config.

In the current implementation, m_can_ram_init is added in the probe and m_can_class_resume function.
If I add the ram init function in chip_config which is getting called from m_can_start, then m_can_init_ram will be called two times, once in resume and next from m_can_start also.

Can we add ram init inside the m_can_open function itself?
Because it is independent of m_can resume functionality.

> > If message RAM init failed then fifo Transmit and receive will fail
> > and there will be no communication. So there is no point to "open and
> > Configure CAN chip".
> 
> For mmio devices the RAM init will probably not fail. There are return values
> and error checking for the SPI attached devices. Where the SPI
> communication will fail. However if this is problem, I assume the chip will not
> be detected in the first place.
> 
> > From my understanding it's better to keep RAM init inside the probe
> > and if there is a failure happened goes to CAN probe failure.
> 
> Marc
> 
> --
> Pengutronix e.K.                 | Marc Kleine-Budde           |
> Embedded Linux                   |
> https://protect2.fireeye.com/v1/url?k=2053d9ab-7fc8e0b4-205252e4-
> 000babdfecba-a8c309c53e3358f5&q=1&e=c0cfd0e2-a422-4821-a49d-
> 113cfa4da9cb&u=https%3A%2F%2Fwww.pengutronix.de%2F  |
> Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ