diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-05-22 12:31:04 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2018-05-27 11:06:00 +0200 |
commit | fd3a4d8d8beecc8b58cd6602cc8ee7207c1bf268 (patch) | |
tree | d8bab63cb1e0eb5d14d1ef305f4134d9a80bc63a /src/mm-filter.c | |
parent | 38f9510a9893b12cd6746c3daeeb2c84166746b1 (diff) |
filter: pci and sdio ports under the platform driver filter
Do not automatically probe serial ports under the 'pci' or 'sdio'
platform drivers unless explicitly tagged with
ID_MM_PLATFORM_DRIVER_PROBE.
$ 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
Diffstat (limited to 'src/mm-filter.c')
-rw-r--r-- | src/mm-filter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-filter.c b/src/mm-filter.c index e6d8a34d..cf877b7e 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; |