summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-10-07 18:21:38 +0200
committerKay Sievers <kay@vrfy.org>2012-10-07 18:22:14 +0200
commitea6039a30929ff845859ed601594546d71894d84 (patch)
tree02178513e502e544bf88dcec2c477e7ac394c496
parent1a3f40f912670d3dea3811a4560b368412090b81 (diff)
udev: allow firmware requests to bypass the dependency tracking
The removal of the TIMEOUT= handling in udevd put firmware requests into the devpath parent/child dependency tracking. Drivers which block in module_init() asking userspace for firmware ran into a 30 sec device timeout. The whole firmware loading willl hopefully move into the kernel and the fragile-since-day-one fake async driver-core device dance involving udev can be retired: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=abb139e75c2cdbb955e840d6331cb5863e409d0e
-rw-r--r--src/udev/udevd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 35263ff13..9bbc8ec8a 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -97,4 +97,5 @@ struct event {
dev_t devnum;
- bool is_block;
int ifindex;
+ bool is_block;
+ bool nodelay;
};
@@ -440,4 +441,6 @@ static int event_queue_insert(struct udev_device *dev)
event->devnum = udev_device_get_devnum(dev);
- event->is_block = (strcmp("block", udev_device_get_subsystem(dev)) == 0);
+ event->is_block = streq("block", udev_device_get_subsystem(dev));
event->ifindex = udev_device_get_ifindex(dev);
+ if (streq(udev_device_get_subsystem(dev), "firmware"))
+ event->nodelay = true;
@@ -521,2 +524,6 @@ static bool is_devpath_busy(struct event *event)
+ /* allow to bypass the dependency tracking */
+ if (event->nodelay)
+ continue;
+
/* parent device event found */