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

Dan Williams dcbw at redhat.com
Tue May 22 13:49:17 UTC 2018


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?

Dan

>   $ realpath /sys/class/tty/ttyS0/
>   /sys/devices/pci0000:00/0000:00:16.3/tty/ttyS0
>   $ basename $(realpath
> /sys/devices/pci0000:00/0000:00:16.3/subsystem)
>   pci
> ---
>  src/mm-filter.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mm-filter.c b/src/mm-filter.c
> index 41529e59..c67e0720 100644
> --- a/src/mm-filter.c
> +++ b/src/mm-filter.c
> @@ -107,7 +107,10 @@ mm_filter_port (MMFilter        *self,
>          /* If the physdev is a 'platform' or 'pnp' device that's not
> whitelisted, ignore it */
>          physdev_subsystem = mm_kernel_device_get_physdev_subsystem
> (port);
>          if ((self->priv->enabled_rules &
> MM_FILTER_RULE_TTY_PLATFORM_DRIVER) &&
> -            (!g_strcmp0 (physdev_subsystem, "platform") ||
> !g_strcmp0 (physdev_subsystem, "pnp"))) {
> +            (!g_strcmp0 (physdev_subsystem, "platform") ||
> +             !g_strcmp0 (physdev_subsystem, "pci") ||
> +             !g_strcmp0 (physdev_subsystem, "pnp") ||
> +             !g_strcmp0 (physdev_subsystem, "sdio"))) {
>              if (!mm_kernel_device_get_global_property_as_boolean
> (port, "ID_MM_PLATFORM_DRIVER_PROBE")) {
>                  mm_dbg ("[filter] (%s/%s): port filtered: port's
> parent platform driver is not whitelisted", subsystem, name);
>                  return FALSE;


More information about the ModemManager-devel mailing list