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.
This commit is contained in:
Aleksander Morgado
2019-08-07 15:13:00 +02:00
committed by Aleksander Morgado
parent 118b19bb75
commit f6d5490eeb
4 changed files with 3 additions and 30 deletions

View File

@@ -203,13 +203,7 @@ $ sudo udevadm trigger
<listitem>
<para><emphasis>MM_FILTER_RULE_TTY_PLATFORM_DRIVER</emphasis></para>
<para>
If this filter is enabled, all platform TTY ports not explicitly flagged with the
<emphasis>ID_MM_PLATFORM_DRIVER_PROBE</emphasis> will be forbidden. If the flag
is found in a platform TTY port, port probing will be allowed directly.
</para>
<para>
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.
</para>
</listitem>
<listitem>

View File

@@ -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

View File

@@ -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:
*

View File

@@ -121,13 +121,9 @@ 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);
mm_dbg ("[filter] (%s/%s): port filtered: tty platform driver", subsystem, name);
return FALSE;
}
mm_dbg ("[filter] (%s/%s): port allowed: port's parent platform driver is whitelisted", subsystem, name);
return TRUE;
}
/* Default allowed? */
if (self->priv->enabled_rules & MM_FILTER_RULE_TTY_DEFAULT_ALLOWED) {