public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] for Linux IRDA initialisation bug 2.4.5
@ 2001-06-01 13:32 Matt Chapman
  2001-06-01 13:59 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Chapman @ 2001-06-01 13:32 UTC (permalink / raw)
  To: Dag Brattli; +Cc: linux-kernel, linux-irda

I've found that if you compile IRDA into the kernel, irda_proto_init
gets called twice - once at do_initcalls time, and once explicitly
in do_basic_setup - eventually resulting in a hang (as
register_netdevice_notifier gets called twice with the same struct,
and it's list becomes circular).

Here's a suggested patch.

Cheers,
Matt


diff -urN linux-2.4.5/init/main.c linux-2.4.5-irdafix/init/main.c
--- linux-2.4.5/init/main.c	Wed May 23 02:35:42 2001
+++ linux-2.4.5-irdafix/init/main.c	Fri Jun  1 23:03:00 2001
@@ -61,10 +61,6 @@
 #include <linux/isapnp.h>
 #endif
 
-#ifdef CONFIG_IRDA
-#include <net/irda/irda_device.h>
-#endif
-
 #ifdef CONFIG_X86_IO_APIC
 #include <asm/smp.h>
 #endif
@@ -698,10 +694,6 @@
 	start_context_thread();
 	do_initcalls();
 
-#ifdef CONFIG_IRDA
-	irda_proto_init();
-	irda_device_init(); /* Must be done after protocol initialization */
-#endif
 #ifdef CONFIG_PCMCIA
 	init_pcmcia_ds();		/* Do this last */
 #endif
diff -urN linux-2.4.5/net/irda/af_irda.c linux-2.4.5-irdafix/net/irda/af_irda.c
--- linux-2.4.5/net/irda/af_irda.c	Sun May 20 10:47:55 2001
+++ linux-2.4.5-irdafix/net/irda/af_irda.c	Fri Jun  1 23:04:25 2001
@@ -2411,9 +2411,7 @@
 	register_netdevice_notifier(&irda_dev_notifier);
 
 	irda_init();
-#ifdef MODULE
- 	irda_device_init();  /* Called by init/main.c when non-modular */
-#endif
+ 	irda_device_init();
 	return 0;
 }
 module_init(irda_proto_init);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-01 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.991404121.32135.linux-kernel2news@redhat.com>
2001-06-01 19:16 ` [PATCH] for Linux IRDA initialisation bug 2.4.5 Pete Zaitcev
2001-06-01 13:32 Matt Chapman
2001-06-01 13:59 ` Keith Owens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox