[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12e03487-d468-c009-72c7-88804e87e256@geanix.com>
Date: Mon, 18 Nov 2019 09:21:45 +0100
From: Sean Nyekjaer <sean@...nix.com>
To: Joakim Zhang <qiangqing.zhang@....com>,
"mkl@...gutronix.de" <mkl@...gutronix.de>
Cc: "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/3] can: flexcan: fix deadlock when using self wakeup
On 18/11/2019 09.04, Joakim Zhang wrote:
>>>> Hi Joakim and Marc
>>>>
>>>> We have quite a few devices in the field where flexcan is stuck in Stop-Mode.
>>>> We do not have the possibility to cold reboot them, and hot reboot
>>>> will not get flexcan out of stop-mode.
>>>> So flexcan comes up with:
>>>> [ 279.444077] flexcan: probe of 2090000.flexcan failed with error
>>>> -110 [ 279.501405] flexcan: probe of 2094000.flexcan failed with
>>>> error -110
>>>>
>>>> They are on, de3578c198c6 ("can: flexcan: add self wakeup support")
>>>>
>>>> Would it be a solution to add a check in the probe function to pull
>>>> it out of stop-mode?
>>>
>>> Hi Sean,
>>>
>>> Soft reset cannot be applied when clocks are shut down in a low power mode.
>> The module should be first removed from low power mode, and then soft reset
>> can be applied.
>>> And exit from stop mode happens when the Stop mode request is removed,
>> or when activity is detected on the CAN bus and the Self Wake Up mechanism is
>> enabled.
>>>
>>> So from my point of view, we can add a check in the probe function to
>>> pull it out of stop mode, since controller actually could be stuck in stop mode
>> if suspend/resume failed and users just want a warm reset for the system.
>>
>> Exactly what I thought could be done :)
>>
>>>
>>> Could you please tell me how can I generate a warm reset? AFAIK, both
>> "reboot" command put into prompt and RST KEY in our EVK board all play a role
>> of cold reset.
>>
>> Warm reset is just `reboot` :-) Cold is poweroff...
>
> I add the code flexcan_enter_stop_mode(priv) at the end of the probe function, 'reboot' the system directly after system active.
> However, I do not meet the probe error, it can probe successfully. Do you know the reason?
You will have to get it in the deadlock situation first :)
This can be achieved by using de3578c198c6 and sending can messages to
both can interfaces while calling suspend.
/Sean
Powered by blists - more mailing lists