[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1491e746-6694-1c36-4bba-ac9f61d9ae6f@ti.com>
Date: Tue, 28 Jul 2020 11:50:48 +0530
From: Faiz Abbas <faiz_abbas@...com>
To: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-can@...r.kernel.org>
CC: <kuba@...nel.org>, <davem@...emloft.net>, <mkl@...gutronix.de>,
<wg@...ndegger.com>, <sriram.dash@...sung.com>, <dmurphy@...com>
Subject: Re: [PATCH] can: m_can: Set device to software init mode before
closing
Hi,
On 16/07/20 9:53 am, Faiz Abbas wrote:
> There might be some requests pending in the buffer when the
> interface close sequence occurs. In some devices, these
> pending requests might lead to the module not shutting down
> properly when m_can_clk_stop() is called.
>
> Therefore, move the device to init state before potentially
> powering it down.
>
> Signed-off-by: Faiz Abbas <faiz_abbas@...com>
> ---
> drivers/net/can/m_can/m_can.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 02c5795b7393..d0c458f7f6e1 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1414,6 +1414,9 @@ static void m_can_stop(struct net_device *dev)
> /* disable all interrupts */
> m_can_disable_all_interrupts(cdev);
>
> + /* Set init mode to disengage from the network */
> + m_can_config_endisable(cdev, true);
> +
> /* set the state as STOPPED */
> cdev->can.state = CAN_STATE_STOPPED;
> }
>
Gentle ping.
Thanks,
Faiz
Powered by blists - more mailing lists