2.6.0-test11 BK: sg and scanner modules not auto-loaded?
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): [email protected]
In message <[email protected]> you write:
Quoted 3 lines
Rusty, is this something obvious? (What are the new
MODULE_ALIASrules, btw? Why are they now growing an extra numeric field?)>
Because some did, some didn't have a minor number.
I standardized on char-major-x-y, because an alias is trivial (char-major-180-*), and almost all the modules are supposed to supply their own aliases, so this should be an entirely in-kernel issue, but they don't, and Linus stopped taking patches.
More aliases below.
Quoted 2 lines
Similar considerations apply to scanner:
alias char-major-180-48 scanner
Where did this alias come from? Of course, scanner.c could put in such an alias, but is it really constant? If so, by all means add a MODULE_ALIAS_CHARDEV() line in scanner.c. Otherwise, leave it to the hotplug code.
MODULE_ALIAS* patches welcome,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Name: More Aliases
Author: Steve Youngs, Stephen Hemminger
Status: Trivial
D: Add more MODULE_ALIASes where required.
drivers/net/pppoe.c +1 -0
@@ -1151,3 +1151,4 @@ module_exit(pppoe_exit);MODULE_AUTHOR ("Michal Ostrowski <[email protected]>" );MODULE_DESCRIPTION ("PPP over Ethernet driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_NETPROTO (PF_PPPOX );
drivers/scsi/sg.c +1 -0
@@ -2974,3 +2974,4 @@ sg_proc_version_info(char *buffer, int *module_init (init_sg);module_exit (exit_sg); +MODULE_ALIAS_CHARDEV_MAJOR (SCSI_GENERIC_MAJOR );
fs/isofs/inode.c +2 -1
@@ -1463,4 +1463,5 @@ static void __exit exit_iso9660_fs(void) module_init(init_iso9660_fs) module_exit(exit_iso9660_fs) MODULE_LICENSE("GPL"); - +/* Actual filesystem name is iso9660, as requested in filesystems.c */ +MODULE_ALIAS ("iso9660" );
sound/core/sound.c +2 -0
@@ -31,6 +31,7 @@#include <sound/initval.h> #include <linux/kmod.h> #include <linux/devfs_fs_kernel.h> +#include <linux/device.h> #define SNDRV_OS_MINORS 256
@@ -52,6 +53,7 @@ MODULE_PARM_SYNTAX(major, "default:116,sMODULE_PARM (cards_limit,"i" );MODULE_PARM_DESC (cards_limit,"Count of soundcards installed in the system." );MODULE_PARM_SYNTAX (cards_limit,"default:8,skill:advanced" ); +MODULE_ALIAS_CHARDEV_MAJOR (CONFIG_SND_MAJOR );#ifdef CONFIG_DEVFS_FS MODULE_PARM (device_mode,"i" );MODULE_PARM_DESC (device_mode,"Device file permission mask for devfs." );
sound/sound_core.c +2 -0
@@ -45,6 +45,7 @@#include <linux/major.h> #include <linux/kmod.h> #include <linux/devfs_fs_kernel.h> +#include <linux/device.h> #define SOUND_STEP 16
@@ -547,6 +548,7 @@ EXPORT_SYMBOL(mod_firmware_load);MODULE_DESCRIPTION ("Core sound module" );MODULE_AUTHOR ("Alan Cox" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (SOUND_MAJOR ); static void __exit cleanup_soundcore(void) {
Quoted 7 lines · Rusty Russell
Quoted 2 lines
Similar considerations apply to scanner:
alias char-major-180-48 scannerWhere did this alias come from? Of course,
scanner.ccould put in such an alias, but is it really constant? If so, by all means add aMODULE_ALIAS_CHARDEV()line inscanner.c. Otherwise, leave it to the hotplug code.
Please just leave it up to the hotplug code to load such drivers as these. Also watch out, if you enable CONFIG_USB_DYNAMIC_MINORS then the usb scanner driver will NOT start at minor number 48, but will be dynamically created.
thanks,
greg k-h
In message <[email protected]> you write:
Quoted 4 lines
Please just leave it up to the hotplug code to load such drivers as these. Also watch out, if you enable
CONFIG_USB_DYNAMIC_MINORSthen the usb scanner driver will NOT start at minor number 48, but will be dynamically created.
Thanks Greg, that's what I figured. Although the hotplug subsystem could create the device nodes and then have kmod load the actual drivers on open, I'm not convinced it's worth it for dynamic devices.
It's been argued that kmod should place a request with the hotplug subsystem, rather than call modprobe, but that's a little too radical for me just yet.
Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Quoted 4 lines · Rusty Russell
It's been argued that kmod should place a request with the hotplug subsystem, rather than call modprobe, but that's a little too radical for me just yet.
That's not too radical, just requires a small script addition in userspace that actually runs modprobe based on a specific hotplug event. In all we'd probably only reduce the kernel by the size of the modprobe array, and the sysctl table, which isn't all that much.
Put it on the 2.7 list :)
thanks,
greg k-h
Quoted 3 lines · Rusty Russell
It's been argued that kmod should place a request with the hotplug subsystem, rather than call modprobe, but that's a little too radical for me just yet.
Hotplug works for 2.4, I don't know what is different in 2.6 - are there hotplug relevant kernel changes? Stupid question maybe, but I'm asking nonetheless :-)
Signature · 3 lines
Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95
Quoted 8 lines · Matthias Andree
Quoted 3 lines · Rusty Russell
It's been argued that kmod should place a request with the hotplug subsystem, rather than call modprobe, but that's a little too radical for me just yet.
Hotplug works for 2.4, I don't know what is different in 2.6 - are there hotplug relevant kernel changes? Stupid question maybe, but I'm asking nonetheless :-)
I haven't been following this thread, so I don't know if this is relevant:
do you have the *very latest* hotplug scripts? The previous ones tested the kernel version against "2.5", while the latest test against that and also "2.6". I think this was in the usb script. Without the "2.6" test device scripts are not run, at least for usb devices.
Ciao,
Duncan.
Quoted 5 lines · Duncan Sands
I haven't been following this thread, so I don't know if this is relevant:
do you have the *very latest* hotplug scripts? The previous ones tested the kernel version against "2.5", while the latest test against that and also "2.6". I think this was in the usb script. Without the "2.6" test device scripts are not run, at least for usb devices.
You bet SuSE Linux 8.2 isn't 2.6 ready (I wonder if 9.0 ships with current hotplug), so I'll have to update my hotplug. Thanks for the pointer.
Signature · 3 lines
Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95