netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joakim Zhang <qiangqing.zhang@nxp.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>,
	"sean@geanix.com" <sean@geanix.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH V2 2/4] can: flexcan: try to exit stop mode during probe stage
Date: Thu, 5 Dec 2019 08:46:58 +0000	[thread overview]
Message-ID: <DB7PR04MB46186FB41B5873FED5ABEC06E65C0@DB7PR04MB4618.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <d68b2b79-34ec-eb4c-cf4b-047b5157d5e3@pengutronix.de>


Hi Sean,

Could you please answer Marc's concern in details when you are free? Then we can discuss how to fix it more reasonable. Thanks.
 
Best Regards,
Joakim Zhang

> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: 2019年12月4日 16:45
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; sean@geanix.com;
> linux-can@vger.kernel.org
> Cc: dl-linux-imx <linux-imx@nxp.com>; netdev@vger.kernel.org
> Subject: Re: [PATCH V2 2/4] can: flexcan: try to exit stop mode during probe
> stage
> 
> On 12/4/19 3:22 AM, Joakim Zhang wrote:
> >
> >> -----Original Message-----
> >> From: Marc Kleine-Budde <mkl@pengutronix.de>
> >> Sent: 2019年12月4日 2:15
> >> To: Joakim Zhang <qiangqing.zhang@nxp.com>; sean@geanix.com;
> >> linux-can@vger.kernel.org
> >> Cc: dl-linux-imx <linux-imx@nxp.com>; netdev@vger.kernel.org
> >> Subject: Re: [PATCH V2 2/4] can: flexcan: try to exit stop mode
> >> during probe stage
> >>
> >> On 11/27/19 6:56 AM, Joakim Zhang wrote:
> >>> CAN controller could be stucked in stop mode once it enters stop
> >>> mode
> >>                           ^^^^^^^ stuck
> >>> when suspend, and then it fails to exit stop mode when resume.
> >>
> >> How can this happen?
> >
> > I am also confused how can this happen, as I asked Sean, only CAN
> > enter stop mode when suspend, then system hang,
> How do you recover the system when suspended?
> 
> > it could let CAN
> > stuck in stop mode. However, Sean said this indeed happen at his side,
> > @sean@geanix.com, could you explain how this happen in details?
> That would be good.
> 
> >>> Only code reset can get CAN out of stop mode,
> >>
> >> What is "code reset"?
> >
> > As I know, "code reset" is to press the POWER KEY from the board. At
> > my side, reboot command from OS also can get CAN out of stop mode.
> Do you mean "cold reset", also known as Power-On-Reset, POR or power
> cycle?
> 
> What does pressing the POWER KEY do? A power cycle of the system or
> toggling the reset line of the imx?
> 
> We need to describe in detail, as not everyone has the same board as you, and
> these boards might not even have a power key :)
> 
> > Below is experiment I did:
> > 	Firstly, do a hacking to let CAN stuck into stop mode, then:
> 
> You mean you put the CAN into stop mode without keeping track in the CAN
> driver that the CAN-IP is in stop mode, e.g. by hacking the driver.
> 
> Then you try several methods to recover:
> 
> > 	(1) press power on/off key, get CAN out of stop mode;
> > 	(2) reboot command from console, get CAN out of stop mode;
> > 	(3) unbind/bind driver, cannot get CAN out of stop mode;
> > 	(4) remod/insmod module, cannot get CAN out of stop mode;
> 
> (2) resets the complete imx, including the CAN-IP core, (1) probably, too.
> 
> (3) and (4) fail to recover the CAN core, as the IP core is still powered off by
> some upstream component. So the question why this happens in the first place
> is IMHO as important as trying to wake up the core. I think if we discover this
> situation (CAN Core is in stop-mode in probe) we should print a warning
> message, but try to recover.
> 
> >>> so add stop mode remove request during probe stage for other
> >>> methods(soft reset from chip level, unbind/bind driver, etc) to let
> >>         ^^^ please add a space
> >>> CAN active again.
> >>
> >> Can you rephrase the sentence after "so add stop mode remove request
> >> during probe stage". I'm not completely sure what you want to tell.
> >
> > Sure.
> 
> tnx,
> Marc
> 
> --
> Pengutronix e.K.                 | Marc Kleine-Budde           |
> Embedded Linux                   | https://www.pengutronix.de  |
> Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


  parent reply	other threads:[~2019-12-05  8:47 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  5:56 [PATCH V2 0/4] can: flexcan: fixes for stop mode Joakim Zhang
2019-11-27  5:56 ` [PATCH V2 1/4] can: flexcan: fix deadlock when using self wakeup Joakim Zhang
2019-11-27  9:58   ` Sean Nyekjaer
2019-12-03 17:25   ` Marc Kleine-Budde
2019-12-03 17:42     ` Marc Kleine-Budde
2019-12-04  1:58     ` Joakim Zhang
2019-12-04  8:31       ` Marc Kleine-Budde
2019-12-04  8:35         ` Joakim Zhang
2019-11-27  5:56 ` [PATCH V2 2/4] can: flexcan: try to exit stop mode during probe stage Joakim Zhang
2019-11-27  9:58   ` Sean Nyekjaer
2019-12-03 18:14   ` Marc Kleine-Budde
2019-12-04  2:22     ` Joakim Zhang
2019-12-04  8:45       ` Marc Kleine-Budde
2019-12-04  9:58         ` Joakim Zhang
2019-12-05  8:46         ` Joakim Zhang [this message]
2019-12-05  9:21         ` Sean Nyekjaer
2019-12-05 11:04           ` Joakim Zhang
2019-12-05 11:11             ` Sean Nyekjaer
2019-12-05 11:19               ` Joakim Zhang
2019-12-05 11:32                 ` Sean Nyekjaer
2019-12-07 20:32                   ` Marc Kleine-Budde
2019-12-08 10:47                     ` Sean Nyekjaer
2019-12-08 10:56                       ` Marc Kleine-Budde
2019-11-27  5:56 ` [PATCH V2 3/4] can: flexcan: change the way of stop mode acknowledgment Joakim Zhang
2019-11-27  9:58   ` Sean Nyekjaer
2019-12-03 18:21   ` Marc Kleine-Budde
2019-12-04  2:23     ` Joakim Zhang
2019-11-27  5:56 ` [PATCH V2 4/4] can: flexcan: add LPSR mode support Joakim Zhang
2019-12-04  2:25   ` Joakim Zhang
2019-12-04  8:59   ` Marc Kleine-Budde
2019-12-04  9:58     ` Joakim Zhang
2019-12-04  9:20   ` Marc Kleine-Budde
2019-12-04  9:59     ` Joakim Zhang
2019-12-04 10:58     ` Joakim Zhang
2019-11-27  6:12 ` [PATCH V2 0/4] can: flexcan: fixes for stop mode Sean Nyekjaer
2019-11-27  8:12   ` Sean Nyekjaer
2019-11-27  9:36     ` Joakim Zhang
2019-11-27  9:48       ` Joakim Zhang
2019-11-27  9:52         ` Sean Nyekjaer
2019-11-27  9:58           ` Joakim Zhang
2019-11-27  9:59             ` Sean Nyekjaer
2019-11-27 10:04               ` Joakim Zhang
2019-12-03 10:16               ` Joakim Zhang

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=DB7PR04MB46186FB41B5873FED5ABEC06E65C0@DB7PR04MB4618.eurprd04.prod.outlook.com \
    --to=qiangqing.zhang@nxp.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=sean@geanix.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;
as well as URLs for NNTP newsgroup(s).