From f6d5490eebd22d2ce679442b03a72e110d113fa9 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 7 Aug 2019 15:13:00 +0200 Subject: [PATCH] udev: remove ID_MM_PLATFORM_DRIVER_PROBE tag This tag is completely redundant because users can whitelist the platform TTY ports to use with the more generic ID_MM_DEVICE_PROCESS tag, which is part of the explicit whitelist filter rule. --- docs/reference/api/ModemManager-overview.xml | 8 +------- docs/reference/api/ModemManager-sections.txt | 1 - include/ModemManager-tags.h | 16 ---------------- src/mm-filter.c | 8 ++------ 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/docs/reference/api/ModemManager-overview.xml b/docs/reference/api/ModemManager-overview.xml index 27a55110..80c18050 100644 --- a/docs/reference/api/ModemManager-overview.xml +++ b/docs/reference/api/ModemManager-overview.xml @@ -203,13 +203,7 @@ $ sudo udevadm trigger MM_FILTER_RULE_TTY_PLATFORM_DRIVER - If this filter is enabled, all platform TTY ports not explicitly flagged with the - ID_MM_PLATFORM_DRIVER_PROBE will be forbidden. If the flag - is found in a platform TTY port, port probing will be allowed directly. - - - Note that this filter is obsoleted by the more generic MM_FILTER_RULE_EXPLICIT_WHITELIST - filter. It is maintained for backwards compatibility with older ModemManager versions. + If this filter is enabled, all platform TTY ports will be forbidden automatically. diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index cfda14ed..15d976c9 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -156,7 +156,6 @@ ID_MM_DEVICE_IGNORE ID_MM_PORT_IGNORE ID_MM_TTY_BLACKLIST ID_MM_TTY_MANUAL_SCAN_ONLY -ID_MM_PLATFORM_DRIVER_PROBE ID_MM_PORT_TYPE_AT_PPP ID_MM_PORT_TYPE_AT_PRIMARY ID_MM_PORT_TYPE_AT_SECONDARY diff --git a/include/ModemManager-tags.h b/include/ModemManager-tags.h index 26834748..ed65af50 100644 --- a/include/ModemManager-tags.h +++ b/include/ModemManager-tags.h @@ -127,22 +127,6 @@ */ #define ID_MM_TTY_MANUAL_SCAN_ONLY "ID_MM_TTY_MANUAL_SCAN_ONLY" -/** - * ID_MM_PLATFORM_DRIVER_PROBE: - * - * This is a port-specific tag applied to platform ports so that they - * are probed automatically by the daemon. Platform ports that don't - * have this tag will never probed. This tag is a bit redundant, as - * the user could also use ID_MM_DEVICE_PROCESS for the same purpose. - * - * This tag is associated to the MM_FILTER_RULE_TTY_PLATFORM_DRIVER - * rule, which is only meaningful when the daemon runs with the - * DEFAULT filter policy type, as that is the only one that would - * allow probing all ports not explicitly forbidden before the last - * MM_FILTER_RULE_TTY_DEFAULT_ALLOWED rule. - */ -#define ID_MM_PLATFORM_DRIVER_PROBE "ID_MM_PLATFORM_DRIVER_PROBE" - /** * ID_MM_PORT_TYPE_AT_PRIMARY: * diff --git a/src/mm-filter.c b/src/mm-filter.c index 743d438e..bc7d378d 100644 --- a/src/mm-filter.c +++ b/src/mm-filter.c @@ -121,12 +121,8 @@ mm_filter_port (MMFilter *self, !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; - } - mm_dbg ("[filter] (%s/%s): port allowed: port's parent platform driver is whitelisted", subsystem, name); - return TRUE; + mm_dbg ("[filter] (%s/%s): port filtered: tty platform driver", subsystem, name); + return FALSE; } /* Default allowed? */