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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user