linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Aleksander Morgado <aleksander@aleksander.es>
Cc: Loic Poulain <loic.poulain@linaro.org>,
	Thomas Perrot <thomas.perrot@bootlin.com>,
	Hemant Kumar <hemantk@codeaurora.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Bhaumik Bhatt <bbhatt@codeaurora.org>
Subject: Re: Sierra Wireless EM9191 integration issues in mhi+wwan
Date: Fri, 22 Oct 2021 20:10:26 +0530	[thread overview]
Message-ID: <20211022144026.GA7657@thinkpad> (raw)
In-Reply-To: <CAAP7ucJrj1HSvqeoXGOc3F2_z2tv5ZgTTexmX8xr57La=_H4ow@mail.gmail.com>

On Fri, Oct 22, 2021 at 11:20:00AM +0200, Aleksander Morgado wrote:
> Hey,
> 
> > > The successful boots seem to happen always on cold boots, and the
> > > success rate is low (30% or so) on some manual testing here. I haven't
> > > seen one single successful boot on system restarts, they all fail like
> > > in the previous email.
> > >
> > > When the boot is successful it looks like this:
> > >
> >
> > This looks to be a firmware issue. The device is in SYS_ERR state during
> > boot and that's expected. But what is strange is that the device stays
> > in SYS_ERR even after host issues RESET.
> >
> > Can you try the below diff and see if it does any good?
> >
> > diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c
> > index fb99e3727155..a43c3ed77fb1 100644
> > --- a/drivers/bus/mhi/core/pm.c
> > +++ b/drivers/bus/mhi/core/pm.c
> > @@ -104,7 +104,8 @@ static struct mhi_pm_transitions const dev_state_transitions[] = {
> >         /* L3 States */
> >         {
> >                 MHI_PM_LD_ERR_FATAL_DETECT,
> > -               MHI_PM_LD_ERR_FATAL_DETECT | MHI_PM_DISABLE
> > +               MHI_PM_LD_ERR_FATAL_DETECT | MHI_PM_DISABLE |
> > +               MHI_PM_SYS_ERR_PROCESS
> >         },
> >  };
> 
> Tested again in the RPi CM4 based setup, but didn't help, it's failing
> in the same way, still says PASS THROUGH state: SYS ERROR:
> 

Yes, that's expected. As I said, the device is going to a bad state and from the
host side, we could only try to recover it.

> [    7.032037] mhi-pci-generic 0000:01:00.0: MHI PCI device found: sierra-em919x
> [    7.039213] mhi-pci-generic 0000:01:00.0: BAR 0: assigned [mem
> 0x600000000-0x600000fff 64bit]
> [    7.047759] mhi-pci-generic 0000:01:00.0: enabling device (0000 -> 0002)
> [    7.054573] mhi-pci-generic 0000:01:00.0: using shared MSI
> [    7.060848] mhi mhi0: Requested to power ON
> [    7.065277] mhi mhi0: Attempting power on with EE: PASS THROUGH,
> state: SYS ERROR
> [    7.072799] mhi mhi0: local ee: INVALID_EE state: RESET device ee:
> PASS THROUGH state: SYS ERROR
> [    7.081589] mhi mhi0: System error detected
> [    7.085867] mhi-pci-generic 0000:01:00.0: firmware crashed (7)
> [    7.091886] mhi mhi0: Handling state transition: SYS ERROR
> [    7.097399] mhi mhi0: Transitioning from PM state: SYS ERROR Detect
> to: SYS ERROR Process
> [    7.105588] mhi-pci-generic 0000:01:00.0: firmware crashed (6)
> 

What happened after this point? Can you share the complete log?

> I've tested the same patches in my desktop PC (based on 5.13.1, and
> even without this last addition) and the boot process is much more
> stable and I cannot see the "firmware crashed" errors reported. My
> assumption right now is that the pci_generic.c entries we're adding
> are correct, but there's some limitation in this system that is making
> the EM9191 boot fail, but I still don't know which limitation it is.
> The memory addresses in the "BAR 0: assigned" log are definitely
> different in the RPi CM4, and also the shared MSI limitation. I recall
> Thomas saying that he also tested on a desktop PC forcing the shared
> MSI limitation and he had the same kind of firmware errors reported;
> I'll also try to test that.
> 

I think the PCI behaviour could be the issue between these 2 setups. But for
knowing exactly what's happening we need to get the log of the modem (I don't
think you can get that though).

Thanks,
Mani

  reply	other threads:[~2021-10-22 14:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 13:04 Sierra Wireless EM9191 integration issues in mhi+wwan Aleksander Morgado
2021-10-09 10:51 ` Manivannan Sadhasivam
2021-10-12 19:38   ` Aleksander Morgado
2021-10-22  4:42     ` Manivannan Sadhasivam
2021-10-22  9:20       ` Aleksander Morgado
2021-10-22 14:40         ` Manivannan Sadhasivam [this message]
2021-10-25  8:10           ` Aleksander Morgado
2021-11-02 10:50             ` Manivannan Sadhasivam
2021-11-02 16:13               ` Aleksander Morgado
2021-11-02 16:22                 ` Manivannan Sadhasivam
2021-11-02 16:55                   ` Aleksander Morgado
2021-11-02 18:09                     ` Manivannan Sadhasivam
     [not found]                       ` <CAMZdPi9+zrsDy9WTipamRWBXMOxUX1tfsk2W52b9wG-4q21fWA@mail.gmail.com>
2021-11-04 22:50                         ` Bhaumik Bhatt
2021-11-08  7:40                       ` Manivannan Sadhasivam
2021-11-08 13:38                         ` Aleksander Morgado
2021-10-11 14:44 ` Thomas Perrot
2021-10-12 19:44   ` Aleksander Morgado
2021-10-14  9:51     ` Thomas Perrot
2021-10-14 10:04       ` Aleksander Morgado
2021-10-14 17:28         ` Loic Poulain
2021-10-14 20:25           ` Aleksander Morgado
2021-10-18  9:14             ` Aleksander Morgado
2021-10-18  9:59               ` Loic Poulain
2021-10-18 11:26                 ` Thomas Perrot
2021-10-18 12:46                   ` Loic Poulain
2021-10-18 14:07                     ` Thomas Perrot
2021-10-18 14:16                       ` Thomas Perrot
2021-10-19  8:38                       ` Aleksander Morgado
2021-10-20  8:43                         ` Aleksander Morgado
2021-10-22 14:33                     ` Aleksander Morgado
2021-11-08 15:11   ` Aleksander Morgado
2021-11-08 16:31     ` Thomas Perrot
2021-11-08 20:16       ` Aleksander Morgado

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=20211022144026.GA7657@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=aleksander@aleksander.es \
    --cc=bbhatt@codeaurora.org \
    --cc=hemantk@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=thomas.perrot@bootlin.com \
    --cc=thomas.petazzoni@bootlin.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).