From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Date: Tue, 13 Jul 2004 11:16:31 +0000 Subject: [PATCH] Enable all events for initramfs Message-Id: <40F3C48F.30905@suse.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------070904040203040305050202" List-Id: To: Linux Kernel Cc: hotplug This is a multi-part message in MIME format. --------------070904040203040305050202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi all, currently most driver events are not sent out when using initramfs as=20 driver_init() (which triggers the events) is called before init_workqueue= s. This patch rearranges the init calls so that the hotplug event queue is=20 enabled prior to calling driver_init(), hence we're getting all hotplug=20 events again. Patch is relative to 2.6.7-mm6, but should apply to 2.6.8-rc1 also. Please apply. Cheers, Hannes --=20 Dr. Hannes Reinecke hare@suse.de SuSE Linux AG S390 & zSeries Maxfeldstra=DFe 5 +49 911 74053 688 90409 N=FCrnberg http://www.suse.de --------------070904040203040305050202 Content-Type: text/x-patch; name="early-hotplug-events.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="early-hotplug-events.patch" --- linux-2.6.7-mm6/init/main.c.orig 2004-07-09 11:01:04.000000000 +0200 +++ linux-2.6.7-mm6/init/main.c 2004-07-09 11:14:19.000000000 +0200 @@ -93,6 +93,7 @@ extern void populate_rootfs(void); extern void driver_init(void); extern void prepare_namespace(void); +extern void usermodehelper_init(void); #ifdef CONFIG_TC extern void tc_init(void); @@ -599,6 +600,10 @@ */ static void __init do_basic_setup(void) { + /* drivers will send hotplug events */ + init_workqueues(); + usermodehelper_init(); + driver_init(); #ifdef CONFIG_SYSCTL @@ -608,7 +613,6 @@ /* Networking initialization needs a process context */ sock_init(); - init_workqueues(); do_initcalls(); } --- linux-2.6.7-mm6/kernel/kmod.c.orig 2004-07-09 11:02:32.000000000 +0200 +++ linux-2.6.7-mm6/kernel/kmod.c 2004-07-13 14:11:09.287575443 +0200 @@ -272,10 +272,8 @@ } EXPORT_SYMBOL(call_usermodehelper); -static __init int usermodehelper_init(void) +void __init usermodehelper_init(void) { khelper_wq = create_singlethread_workqueue("khelper"); BUG_ON(!khelper_wq); - return 0; } -core_initcall(usermodehelper_init); --------------070904040203040305050202-- ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel