On Mon, May 24, 2010 at 19:02, Jon Masters <jonathan@xxxxxxxxxxxxxx> wrote: > On Mon, 2010-05-24 at 16:15 +0200, Kay Sievers wrote: >> From: Kay Sievers <kay.sievers@xxxxxxxx> >> Subject: depmod: export static device node information to modules.devname >> >> To be able to let udev support kernel module on-demand loading, the next >> kernel will export: >> alias: devname:<name> >> for some well-defined common kernel modules. This will let the kernel call >> modprobe when the device node is accessed, the subsystem/driver will be >> initialized and the open() of the device node will magically succeed. > > So this is for devtmpfs type accesses? If there's an attempt to > open /dev/foo and we have an alias for that device, load it? It does not depend on devtmpfs, it will work on any kernel, just when open() arrives in the kernel with an unregistered dev_t, the kernel will compose an {char,block}-major-* alias with that number an exec modprobe. The open() will block until the modprobe succeeded or failed. It's just that with udev, we usually don't have any "dead" device nodes, and this patch makes this possible. > I'm cool with taking this if this is the way the kernel is going (I've > not really thought about the devtmpfs/devfs/udev argument enough > recently to have a hugely strong opinion on it). I was going to ask the > same thing Scott did then I realized your point, so yea there's no way > to magically know what device a driver is going to export. If this is > landing in 2.6.35 then that is very good to know, thanks. Yeah, it's queued up in Greg's tree and is planned to land in 2.6.35: http://git.kernel.org/?p=linux/kernel/git/gregkh/patches.git;a=blob;f=driver-core.current/driver-core-add-devname-module-aliases-to-allow-module-on-demand-auto-loading.patch;hb=HEAD The udev part is already released. Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html