From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BC21C433F5 for ; Mon, 18 Oct 2021 14:08:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2376260EFE for ; Mon, 18 Oct 2021 14:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232216AbhJROKm (ORCPT ); Mon, 18 Oct 2021 10:10:42 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:43647 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231920AbhJROJV (ORCPT ); Mon, 18 Oct 2021 10:09:21 -0400 Received: (Authenticated sender: thomas.perrot@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 9FA93E0012; Mon, 18 Oct 2021 14:07:07 +0000 (UTC) Message-ID: <1f846b0be78560c1299fa26d351b66567be403e1.camel@bootlin.com> Subject: Re: Sierra Wireless EM9191 integration issues in mhi+wwan From: Thomas Perrot To: Loic Poulain Cc: Aleksander Morgado , Manivannan Sadhasivam , Hemant Kumar , Thomas Petazzoni , linux-arm-msm Date: Mon, 18 Oct 2021 16:07:06 +0200 In-Reply-To: References: <2c34a05884cd68eb08e061e9d4d1aa572d78f03c.camel@bootlin.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-aKOnpjrxsmNXJVJk46ls" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org --=-aKOnpjrxsmNXJVJk46ls Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Mon, 2021-10-18 at 14:46 +0200, Loic Poulain wrote: > On Mon, 18 Oct 2021 at 13:26, Thomas Perrot < > thomas.perrot@bootlin.com> wrote: > >=20 > > Hi Loic, > >=20 > > On Mon, 2021-10-18 at 11:59 +0200, Loic Poulain wrote: > > > Hi Aleksander, > > >=20 > > > On Mon, 18 Oct 2021 at 11:14, Aleksander Morgado > > > wrote: > > > >=20 > > > > Hey all, > > > >=20 > > > > > [=C2=A0=C2=A0=C2=A0 7.056113] mhi-pci-generic 0000:01:00.0: MHI P= CI device > > > > > found: > > > > > sierra-em919x > > > > > [=C2=A0=C2=A0=C2=A0 7.063298] mhi-pci-generic 0000:01:00.0: BAR 0= : assigned > > > > > [mem > > > > > 0x600000000-0x600000fff 64bit] > > > > > [=C2=A0=C2=A0=C2=A0 7.071846] mhi-pci-generic 0000:01:00.0: enabl= ing device > > > > > (0000 > > > > > -> 0002) > > > > > [=C2=A0=C2=A0=C2=A0 7.078671] mhi-pci-generic 0000:01:00.0: using= shared MSI > > > >=20 > > > > In this specific setup we request 4 MSI vectors through > > > > pci_alloc_irq_vectors(), but only end up allocating a single > > > > one > > > > (i.e. > > > > mhi_cntrl->nr_irqs =3D 1). Could that be related to the problem > > > > somehow? > > >=20 > > > It shouldn't, we have the 'shared IRQ' fallback which is used > > > when we > > > can not setup multiple MSI, and this works with other SDX55 based > > > modems. > > >=20 > >=20 > > Compared to other SDX55 based modems, EM919x uses the same event > > ring > > for the control, the data and the diag, and we use the macro > > MHI_EVENT_CONFIG_CTRL to configure it. > > - Perhaps this macro is not suitable in this case? >=20 > Well it should work, but it's usually better to have a dedicated > event > ring for non-control stuff. > The number of event ring is normally driven by the host, is it a > limitation with EM919X? I asked the question to our Sierra distributor, because it isn't indicated in the technical documentation that I have, I'm still waiting for the answer. > What is done in the downstream driver? As we encountered issues with the generic event ring configuration, I tried with a configuration equivalent to that of the vendor driver, that uses the same ring for data, control and diag stuff. Best regards, Thomas >=20 > > - Could this be explaining, what are we observing? >=20 > Hmm, as I said device should follow what the host is configuring in > terms of event rings, but maybe in your case a specific configuration > is expected, so it would be nice to double check with what is done in > the downstream driver. As well, do you have any way to access the > serial/debug console of the EM919X? >=20 > > Moreover, we have voluntarily reduced the number of shared MSI > > vectors > > to one, on a platform able to provide enough, then we observe the > > same > > kind of issues, as on i.MX6DL which end up allocating a single one. > > However, we carried out this test only with the vendor driver. >=20 > You mean the same initialization issue? >=20 > Regards, > Loic --=20 Thomas Perrot, Bootlin Embedded Linux and kernel engineering https://bootlin.com --=-aKOnpjrxsmNXJVJk46ls Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGzBAABCAAdFiEEh0B3xqajCiMDqBIhn8ALBXH+Cu0FAmFtf4oACgkQn8ALBXH+ Cu3NgQwAlKkkQk6Ixc2l7hBxX6dBiDHPbP2VKTAcvjhBJAhaCzu+lGnwOkHR3i/8 Er/VgMmgUMBOpVindyPTQePc/mj/80e93Y/qsK7gGqg0YAtH7H0GR0ZWYqYCrsMX 5lYGjOKyE4GVNRBAILYUJQvDXw6tLExFrC2bmceV95eeCV4iLEsDzLsJ0/K/YxmG Hd1ul2PdZ8icA0d4HRXEJySF6Guj84iscU30dJsf6AmewaKiFQEGsXmnfdwXa78U OGO19ZIJ45jtwG8LT4M7vTCcjd+OsAJLQET8MRQ7ivJwCrBgCZCvwZuq0VQR0Yw7 hC2WynAM4ZtyakHdjm+SR6o/rqLlrHolWz2Lc9j5DrMgTzqzW2wpCqHJrM3cDL4N 1Bm39X4Tfa7oPu+PJrrMYPletuABfypysGSMDCUUt8rlGmSGsINXs1uTCgh1oAla LTCb5VEnVi049xeB5O9CyQJ6WiGZzrKDjkpTFjlfXvaubEuhpWKcSD9z48BJS5jX CH/zL+Pl =378I -----END PGP SIGNATURE----- --=-aKOnpjrxsmNXJVJk46ls--