diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-27 07:47:53 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-27 07:47:53 +0000 |
commit | 0869e8e6b02d0d61f66aaf94b5aff657b778f4bf (patch) | |
tree | c8d6722cb26bac6cca5029654b224df7d63a45a8 /user/bolt/wakeup.patch | |
parent | 6c9bc4e8ae2b92d15cd7c3fb25c626c1424a770f (diff) | |
download | packages-0869e8e6b02d0d61f66aaf94b5aff657b778f4bf.tar.gz packages-0869e8e6b02d0d61f66aaf94b5aff657b778f4bf.tar.bz2 packages-0869e8e6b02d0d61f66aaf94b5aff657b778f4bf.tar.xz packages-0869e8e6b02d0d61f66aaf94b5aff657b778f4bf.zip |
user/bolt: New package
Diffstat (limited to 'user/bolt/wakeup.patch')
-rw-r--r-- | user/bolt/wakeup.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/user/bolt/wakeup.patch b/user/bolt/wakeup.patch new file mode 100644 index 000000000..a10d420c4 --- /dev/null +++ b/user/bolt/wakeup.patch @@ -0,0 +1,50 @@ +From ea3e3e30eb3ce76f6a0ae816a0f35809872f4edf Mon Sep 17 00:00:00 2001 +From: Christian Kellner <christian@kellner.me> +Date: Mon, 13 Jan 2020 17:38:47 +0100 +Subject: [PATCH] manager: ignore wakeup device uevents for probing + +The probing detection code should ignore wakeup device uevents +because these virtual devices can be added (and removed) without +and correspondence to any physical thunderbolt device (un-)plug +events. +--- + boltd/bolt-manager.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/boltd/bolt-manager.c b/boltd/bolt-manager.c +index 877c008..c8b60da 100644 +--- a/boltd/bolt-manager.c ++++ b/boltd/bolt-manager.c +@@ -2043,6 +2043,16 @@ device_is_thunderbolt_root (struct udev_device *dev) + bolt_streq (driver, "thunderbolt"); + } + ++static gboolean ++device_is_wakeup (struct udev_device *dev) ++{ ++ const char *subsys; ++ ++ subsys = udev_device_get_subsystem (dev); ++ ++ return bolt_streq (subsys, "wakeup"); ++} ++ + static gboolean + probing_add_root (BoltManager *mgr, + struct udev_device *dev) +@@ -2080,6 +2090,12 @@ manager_probing_device_added (BoltManager *mgr, + if (syspath == NULL) + return; + ++ /* ignore events for wakeup devices which get removed ++ * and added at random time without any connection to ++ * any physical thunderbolt device */ ++ if (device_is_wakeup (dev)) ++ return; ++ + roots = mgr->probing_roots; + for (guint i = 0; i < roots->len; i++) + { +-- +2.24.1 + |