[PATCH] filter: pci and sdio ports under the platform driver filter

Dan Williams dcbw at redhat.com
Thu May 24 15:25:34 UTC 2018


On Wed, 2018-05-23 at 08:51 +0200, Aleksander Morgado wrote:
> On Tue, May 22, 2018 at 11:22 PM, Dan Williams <dcbw at redhat.com>
> wrote:
> > On Tue, 2018-05-22 at 11:39 -0500, Dan Williams wrote:
> > > On Tue, 2018-05-22 at 17:40 +0200, Aleksander Morgado wrote:
> > > > On Tue, May 22, 2018 at 3:49 PM, Dan Williams <dcbw at redhat.com>
> > > > wrote:
> > > > > On Tue, 2018-05-22 at 12:31 +0200, Aleksander Morgado wrote:
> > > > > > Do not automatically probe serial ports under the 'pci' or
> > > > > > 'sdio'
> > > > > > platform drivers unless explicitly tagged with
> > > > > > ID_MM_PLATFORM_DRIVER_PROBE.
> > > > > 
> > > > > Hmm, now I have to dig out my Nozomi card to make sure we
> > > > > don't
> > > > > break
> > > > > that one... It's pure PCI device with serial ports, not a USB
> > > > > hub
> > > > > like
> > > > > every other kind.  If this breaks nozomi, I guess we add some
> > > > > udev
> > > > > files with DRIVER_PROBE?
> > > > > 
> > > > 
> > > > Yes, I believe we should probably explicitly whitelist those
> > > > somehow,
> > > > otherwise we would be probing other non-modems ttySx ports in
> > > > the
> > > > system. Or, just assume that this kind of device requires
> > > > manual
> > > > udev
> > > > tagging from the user?
> > > 
> > > The only example I know of is Nozomi, so I think it's probably OK
> > > to
> > > just udev tag it by default.
> > 
> > Eh it's easier than that.  What do you think?
> > 
> > Dan
> > 
> > diff --git a/src/mm-filter.c b/src/mm-filter.c
> > index 41529e59..e6d8a34d 100644
> > --- a/src/mm-filter.c
> > +++ b/src/mm-filter.c
> > @@ -129,6 +129,8 @@ mm_filter_port (MMFilter        *self,
> >          if ((self->priv->enabled_rules &
> > MM_FILTER_RULE_TTY_DRIVER) &&
> >              (!g_strcmp0 (driver, "option1") ||
> >               !g_strcmp0 (driver, "qcserial") ||
> > +             !g_strcmp0 (driver, "qcaux") ||
> > +             !g_strcmp0 (driver, "nozomi") ||
> >               !g_strcmp0 (driver, "sierra"))) {
> >              mm_dbg ("[filter] (%s/%s): port allowed: modem-
> > specific kernel driver detected", subsystem, name);
> >              return TRUE;
> > 
> 
> Yes, makes sense :)

Pushed to git master.

Dan


More information about the ModemManager-devel mailing list