Re: Sierra Wireless EM9191 integration issues in mhi+wwan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Loic,

> > > > > Otherwise, when responses are received, we also can observe strange
> > > > > things: unexpected messages, response to previous commands or queue
> > > > > buffer issue.
> > > > >
> > > >
> > > > Are you testing this with qmicli + mbimcli + ModemManager? And if so,
> > > > are you running the qmicli/mbimcli commands with the "-p" option in
> > > > order to always use the intermediate qmi-proxy/mbim-proxy? I'd
> > > > suggest
> > > > to always do that to avoid having multiple processes talking to the
> > > > ports at the same time.
> > > >
> > >
> > > In first, I'm testing with qmicli/mbimcli commands with the "-p" option
> > > in order to always use the intermediate qmi-proxy/mbim-proxy that that
> > > I run in debug mode beforehand.
> > >
> >
> > Ah, nice, that helps to clarify. When using the proxies, there should
> > be always one single process accessing the ports.
> >
> > > >
> > > > > I updated the topic opened on the Sierra Wireless forum, with our
> > > > > latest progress and as well as additional information.
> > > > >
> > > > > In addition, we observed some strange behavior of the EM919x after
> > > > > warm
> > > > > reboots.
> > > > >
> > > >
> > > > Is the log after the warm reboots similar to the one I showed in my
> > > > first email, i.e. with the 2 reported "firmware crashes"? Or does it
> > > > look totally different?
> > >
> > > After warm reboots, we observe no explain message indicating an error,
> > > but we use an old firmware version.
> > >
> >
> > Ok.
> >
> > > > And, do you always see the module booting properly on cold boots? Or
> > > > do you see failed boots like the one i showed in my first email?
> > >
> > > The module doesn't always booting properly, you see failed boots like
> > > the one you showed.
> >
> > This is good, because it confirms that our fully different platforms
> > running the same kernel driver show the same symptoms. So it shouldn't
> > be an issue of the platform, it's likely either the driver or the
> > module firmware.
>
> So it looks like the device is not in the state expected by MHI core,
> not sure however if it's a bad interpretation of MHI implementation or
> a specific issue in that firmware. Maybe one thing you could try is to
> call mhi_soc_reset(); msleep(1000); just after
> mhi_register_controller() in pci_generic probe() function... it is
> supposed to hard reset the modem CPU, and maybe getting it in better
> shape?
>

I've tried your suggestion:

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index 1499226c6cef..eaf5243d44f0 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -783,6 +783,10 @@ static int mhi_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
     if (err)
         goto err_disable_reporting;

+    /* Hard reset modem CPU */
+    mhi_soc_reset(mhi_cntrl);
+    msleep(1000);
+
     /* MHI bus does not power up the controller by default */
     err = mhi_prepare_for_power_up(mhi_cntrl);
     if (err) {
-- 
2.33.0

But didn't help :/ The logs look quite similar:

[    7.056113] mhi-pci-generic 0000:01:00.0: MHI PCI device found: sierra-em919x
[    7.063298] mhi-pci-generic 0000:01:00.0: BAR 0: assigned [mem
0x600000000-0x600000fff 64bit]
[    7.071846] mhi-pci-generic 0000:01:00.0: enabling device (0000 -> 0002)
[    7.078671] mhi-pci-generic 0000:01:00.0: using shared MSI
[    8.100563] mhi mhi0: Requested to power ON
[    8.104971] mhi mhi0: Attempting power on with EE: PASS THROUGH,
state: SYS ERROR
[   10.979537] mhi mhi0: local ee: INVALID_EE state: RESET device ee:
PASS THROUGH state: SYS ERROR
[   10.988331] mhi mhi0: System error detected
[   10.992553] mhi-pci-generic 0000:01:00.0: firmware crashed (7)
[   10.998399] mhi mhi0: Power on setup success
[   11.002710] mhi mhi0: Handling state transition: SYS ERROR
[   11.008198] mhi mhi0: Transitioning from PM state: Linkdown or
Error Fatal Detect to: SYS ERROR Process
[   11.017597] mhi-pci-generic 0000:01:00.0: firmware crashed (6)
[   11.023430] mhi mhi0: Failed to transition from PM state: Linkdown
or Error Fatal Detect to: SYS ERROR Process
[   11.033433] mhi mhi0: Exiting with PM state: Linkdown or Error
Fatal Detect, MHI state: RESET
[   11.041958] mhi mhi0: Handling state transition: PBL
[   11.046922] mhi mhi0: Device MHI is not in valid state
[   11.052060] mhi mhi0: Handling state transition: DISABLE
[   11.057370] mhi mhi0: Processing disable transition with PM state:
Linkdown or Error Fatal Detect
[   11.066243] mhi mhi0: Waiting for all pending event ring processing
to complete
[   11.073561] mhi mhi0: Waiting for all pending threads to complete
[   11.079653] mhi mhi0: Reset all active channels and remove MHI devices
[   11.086181] mhi mhi0: Resetting EV CTXT and CMD CTXT
[   11.091146] mhi mhi0: Exiting with PM state: DISABLE, MHI state: RESET
[   11.097734] mhi-pci-generic 0000:01:00.0: failed to power up MHI controller
[   11.104937] mhi-pci-generic: probe of 0000:01:00.0 failed with error -110


This is with Sierra's latest firmware for the device, BTW, version 03.04.03.00

-- 
Aleksander
https://aleksander.es



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux