* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? [not found] <20031218091404.4b2f743b.akpm@osdl.org> @ 2003-12-19 0:03 ` Rusty Russell 2003-12-19 18:10 ` Greg KH 0 siblings, 1 reply; 7+ messages in thread From: Rusty Russell @ 2003-12-19 0:03 UTC (permalink / raw) To: Andrew Morton; +Cc: greg, Matthias Andree, Linux-Kernel mailing list In message <20031218091404.4b2f743b.akpm@osdl.org> you write: > > Rusty, is this something obvious? (What are the new MODULE_ALIAS rules, > 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. > 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. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .995-linux-2.6.0/drivers/net/pppoe.c .995-linux-2.6.0.updated/drivers/net/pppoe.c --- .995-linux-2.6.0/drivers/net/pppoe.c 2003-11-28 12:27:23.000000000 +1100 +++ .995-linux-2.6.0.updated/drivers/net/pppoe.c 2003-12-19 10:36:26.000000000 +1100 @@ -1151,3 +1151,4 @@ module_exit(pppoe_exit); MODULE_AUTHOR("Michal Ostrowski <mostrows@speakeasy.net>"); MODULE_DESCRIPTION("PPP over Ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS_NETPROTO(PF_PPPOX); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .995-linux-2.6.0/drivers/scsi/sg.c .995-linux-2.6.0.updated/drivers/scsi/sg.c --- .995-linux-2.6.0/drivers/scsi/sg.c 2003-11-24 15:42:31.000000000 +1100 +++ .995-linux-2.6.0.updated/drivers/scsi/sg.c 2003-12-19 10:37:45.000000000 +1100 @@ -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); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .995-linux-2.6.0/fs/isofs/inode.c .995-linux-2.6.0.updated/fs/isofs/inode.c --- .995-linux-2.6.0/fs/isofs/inode.c 2003-10-09 18:02:58.000000000 +1000 +++ .995-linux-2.6.0.updated/fs/isofs/inode.c 2003-12-19 10:36:26.000000000 +1100 @@ -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"); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .995-linux-2.6.0/sound/core/sound.c .995-linux-2.6.0.updated/sound/core/sound.c --- .995-linux-2.6.0/sound/core/sound.c 2003-09-29 10:26:17.000000000 +1000 +++ .995-linux-2.6.0.updated/sound/core/sound.c 2003-12-19 10:36:26.000000000 +1100 @@ -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,s MODULE_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."); diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .995-linux-2.6.0/sound/sound_core.c .995-linux-2.6.0.updated/sound/sound_core.c --- .995-linux-2.6.0/sound/sound_core.c 2003-09-22 10:28:16.000000000 +1000 +++ .995-linux-2.6.0.updated/sound/sound_core.c 2003-12-19 10:36:26.000000000 +1100 @@ -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) { ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-19 0:03 ` Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? Rusty Russell @ 2003-12-19 18:10 ` Greg KH 2003-12-20 3:04 ` Rusty Russell 0 siblings, 1 reply; 7+ messages in thread From: Greg KH @ 2003-12-19 18:10 UTC (permalink / raw) To: Rusty Russell; +Cc: Andrew Morton, Matthias Andree, Linux-Kernel mailing list On Fri, Dec 19, 2003 at 11:03:57AM +1100, Rusty Russell wrote: > > 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. 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-19 18:10 ` Greg KH @ 2003-12-20 3:04 ` Rusty Russell 2003-12-21 0:49 ` Greg KH 2003-12-21 1:25 ` Matthias Andree 0 siblings, 2 replies; 7+ messages in thread From: Rusty Russell @ 2003-12-20 3:04 UTC (permalink / raw) To: Greg KH; +Cc: Andrew Morton, Matthias Andree, Linux-Kernel mailing list In message <20031219181039.GI3017@kroah.com> you write: > 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, 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-20 3:04 ` Rusty Russell @ 2003-12-21 0:49 ` Greg KH 2003-12-21 1:25 ` Matthias Andree 1 sibling, 0 replies; 7+ messages in thread From: Greg KH @ 2003-12-21 0:49 UTC (permalink / raw) To: Rusty Russell; +Cc: Andrew Morton, Matthias Andree, Linux-Kernel mailing list On Sat, Dec 20, 2003 at 02:04:59PM +1100, Rusty Russell wrote: > > 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-20 3:04 ` Rusty Russell 2003-12-21 0:49 ` Greg KH @ 2003-12-21 1:25 ` Matthias Andree 2003-12-21 12:37 ` Duncan Sands 1 sibling, 1 reply; 7+ messages in thread From: Matthias Andree @ 2003-12-21 1:25 UTC (permalink / raw) To: Linux-Kernel mailing list On Sat, 20 Dec 2003, Rusty Russell wrote: > 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 :-) -- Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-21 1:25 ` Matthias Andree @ 2003-12-21 12:37 ` Duncan Sands 2003-12-21 12:44 ` Matthias Andree 0 siblings, 1 reply; 7+ messages in thread From: Duncan Sands @ 2003-12-21 12:37 UTC (permalink / raw) To: Matthias Andree, Linux-Kernel mailing list On Sunday 21 December 2003 02:25, Matthias Andree wrote: > On Sat, 20 Dec 2003, Rusty Russell wrote: > > 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? 2003-12-21 12:37 ` Duncan Sands @ 2003-12-21 12:44 ` Matthias Andree 0 siblings, 0 replies; 7+ messages in thread From: Matthias Andree @ 2003-12-21 12:44 UTC (permalink / raw) To: Linux-Kernel mailing list On Sun, 21 Dec 2003, Duncan Sands wrote: > 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. -- Matthias Andree Encrypt your mail: my GnuPG key ID is 0x052E7D95 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-12-21 12:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20031218091404.4b2f743b.akpm@osdl.org>
2003-12-19 0:03 ` Fw: 2.6.0-test11 BK: sg and scanner modules not auto-loaded? Rusty Russell
2003-12-19 18:10 ` Greg KH
2003-12-20 3:04 ` Rusty Russell
2003-12-21 0:49 ` Greg KH
2003-12-21 1:25 ` Matthias Andree
2003-12-21 12:37 ` Duncan Sands
2003-12-21 12:44 ` Matthias Andree
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox