switch arcnet over to initcalls
Subsystems (3)
PATCH 1/1 switch arcnet over to initcalls
Link order already equals the old init order. arcnet init/registration code still is more than fishy, maybe I'll look into that later.
drivers/net/setup.c +0 -4
@@ -11,7 +11,6 @@extern int dmascc_init (void ); -extern int arcnet_init (void );extern int scc_enet_init (void );extern int fec_enet_init (void );extern int sdla_setup (void );
@@ -41,9 +40,6 @@#endif #if defined(CONFIG_SDLA) {sdla_c_setup, 0}, -#endif -#if defined(CONFIG_ARCNET) - {arcnet_init, 0}, #endif #if defined(CONFIG_SCC_ENET) {scc_enet_init, 0},
drivers/net/arcnet/arc-rawmode.c +7 -13
@@ -53,10 +53,12 @@ }; -void arcnet_raw_init (void ) +static int __init arcnet_raw_init (void ) {int count; +printk (VERSION ); +for (count =0 ; count <256 ; count++)if (arc_proto_map[count] == arc_proto_default) arc_proto_map[count] = &rawmode_proto;
@@ -66,26 +68,18 @@ arc_bcast_proto = &rawmode_proto; arc_proto_default = &rawmode_proto; -} - - -#ifdef MODULE - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_raw_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_raw_exit(void) {arcnet_unregister_proto (&rawmode_proto); } -MODULE_LICENSE ("GPL" ); -#endif /* MODULE */ +module_init (arcnet_raw_init); +module_exit (arcnet_raw_exit); +MODULE_LICENSE ("GPL" );/* packet receiver */
drivers/net/arcnet/arcnet.c +9 -39
69 lines not on this page · raw message
drivers/net/arcnet/com20020-isa.c +0 -4
@@ -54,10 +54,6 @@unsigned long airqmask;struct arcnet_local *lp = dev->priv; -#ifndef MODULE -arcnet_init (); -#endif -BUGLVL (D_NORMAL)printk (VERSION); ioaddr = dev->base_addr;
drivers/net/arcnet/com20020-pci.c +0 -3
@@ -183,9 +183,6 @@static int __init com20020pci_init (void ) {BUGLVL (D_NORMAL)printk (VERSION); -#ifndef MODULE -arcnet_init (); -#endif return pci_module_init (&com20020pci_driver); }
drivers/net/arcnet/com90io.c +0 -4
@@ -151,10 +151,6 @@int ioaddr = dev->base_addr, status;unsigned long airqmask; -#ifndef MODULE -arcnet_init (); -#endif -BUGLVL (D_NORMAL)printk (VERSION); BUGLVL(D_NORMAL) printk("E-mail me if you actually test this driver, please!\n");
drivers/net/arcnet/com90xx.c +13 -28
105 lines not on this page · raw message
drivers/net/arcnet/rfc1051.c +7 -14
@@ -53,8 +53,10 @@ }; -void __init arcnet_rfc1051_init (void ) +static int __init arcnet_rfc1051_init (void ) { +printk (VERSION ); + arc_proto_map[ARC_P_IP_RFC1051 ] = arc_proto_map[ARC_P_ARP_RFC1051 ] = &rfc1051_proto;
@@ -63,27 +65,18 @@if (arc_bcast_proto == arc_proto_default) arc_bcast_proto = &rfc1051_proto; -} - - -#ifdef MODULE - -MODULE_LICENSE ("GPL" ); - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_rfc1051_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_rfc1051_exit(void) {arcnet_unregister_proto (&rfc1051_proto); } -#endif /* MODULE */ +module_init (arcnet_rfc1051_init); +module_exit (arcnet_rfc1051_exit); +MODULE_LICENSE ("GPL" );/* * Determine a packet's protocol ID.
drivers/net/arcnet/rfc1201.c +6 -14
@@ -53,8 +53,10 @@ }; -void __init arcnet_rfc1201_init (void ) +static int __init arcnet_rfc1201_init (void ) { +printk (VERSION ); + arc_proto_map[ARC_P_IP ] = arc_proto_map[ARC_P_IPV6 ] = arc_proto_map[ARC_P_ARP ]
@@ -66,27 +68,17 @@/* if someone else already owns the broadcast, we won't take it */ if (arc_bcast_proto == arc_proto_default) arc_bcast_proto = &rfc1201_proto; -} - - -#ifdef MODULE -MODULE_LICENSE ("GPL" ); - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_rfc1201_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_rfc1201_exit(void) {arcnet_unregister_proto (&rfc1201_proto); } -#endif /* MODULE */ - +module_init (arcnet_rfc1201_init); +module_exit (arcnet_rfc1201_exit);/* * Determine a packet's protocol ID.
include/linux/arcdevice.h +0 -9
@@ -333,14 +333,5 @@void arcdev_setup (struct net_device *dev);void arcnet_rx (struct net_device *dev,int bufnum); -void arcnet_init (void ); - -void arcnet_rfc1201_init (void ); -void arcnet_rfc1051_init (void ); -void arcnet_raw_init (void ); - -int com90xx_probe (struct net_device *dev); -#endif /* __KERNEL__ */ -#endif /* _LINUX_ARCDEVICE_H */
From: Christoph Hellwig <[email protected]>
Date: Wed, 21 May 2003 22:16:38 +0200
Link order already equals the old init order. arcnet init/registration code still is more than fishy, maybe I'll look into that later.
ISA device init ordering again Christoph, com90xx is an ISA driver...
Quoted 8 lines · David S. Miller
From: Christoph Hellwig <[email protected]>
Date: Wed, 21 May 2003 22:16:38 +0200Link order already equals the old init order. arcnet init/registration code still is more than fishy, maybe I'll look into that later.
ISA device init ordering again Christoph, com90xx is an ISA driver...
It's not probed from Space.c so it's probed after most isa devices anyway. You can't just veto all initcall changes because they are isa devices - if it's the unlikely case that it actually breaks for someone he can still complain.
From: Christoph Hellwig <[email protected]>
Date: Thu, 22 May 2003 07:57:11 +0200
It's not probed from Space.c so it's probed after most isa devices anyway.
Yes it is, because com90xx init was being done via arcnet init. Which in turn was being done in Space.c and looks to be SPECIFICALLY being invoked after ethernet ISA devices are probed.
You can't just veto all initcall changes because they are isa devices
I absolutely can. Until someone can document the dependencies I have every right to reject this change because it's effects are unknown to actual users.
You can't even test your changes.
Quoted 8 lines · David S. Miller
From: Christoph Hellwig <[email protected]>
Date: Thu, 22 May 2003 07:57:11 +0200It's not probed from
Space.cso it's probed after most isa devices anyway.Yes it is, because com90xx init was being done via arcnet init. Which in turn was being done in
Space.c
it was done in setup.c
From: Christoph Hellwig <[email protected]>
Date: Thu, 22 May 2003 08:10:03 +0200
Quoted 2 lines · David S. Miller
com90xx init was being done via arcnet init.
Which in turn was being done inSpace.c
it was done in setup.c
Yuck, it's in pci_probes[]. :(
Ok, please resend your patch I'll apply it.
Quoted 4 lines · David S. Miller
From: Christoph Hellwig <[email protected]>
Date: Thu, 22 May 2003 08:10:03 +0200On Wed, May 21, 2003 at 11:02:11PM -0700, David S. Miller wrote:
Quoted 8 lines
Quoted 2 lines
com90xx init was being done via arcnet init.
Which in turn was being done inSpace.cit was done in
setup.cYuck, it's in pci_probes[]. :(
Ok, please resend your patch I'll apply it.
drivers/net/setup.c +0 -4
@@ -11,7 +11,6 @@extern int dmascc_init (void ); -extern int arcnet_init (void );extern int scc_enet_init (void );extern int fec_enet_init (void );extern int sdla_setup (void );
@@ -41,9 +40,6 @@#endif #if defined(CONFIG_SDLA) {sdla_c_setup, 0}, -#endif -#if defined(CONFIG_ARCNET) - {arcnet_init, 0}, #endif #if defined(CONFIG_SCC_ENET) {scc_enet_init, 0},
drivers/net/arcnet/arc-rawmode.c +7 -13
@@ -53,10 +53,12 @@ }; -void arcnet_raw_init (void ) +static int __init arcnet_raw_init (void ) {int count; +printk (VERSION ); +for (count =0 ; count <256 ; count++)if (arc_proto_map[count] == arc_proto_default) arc_proto_map[count] = &rawmode_proto;
@@ -66,26 +68,18 @@ arc_bcast_proto = &rawmode_proto; arc_proto_default = &rawmode_proto; -} - - -#ifdef MODULE - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_raw_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_raw_exit(void) {arcnet_unregister_proto (&rawmode_proto); } -MODULE_LICENSE ("GPL" ); -#endif /* MODULE */ +module_init (arcnet_raw_init); +module_exit (arcnet_raw_exit); +MODULE_LICENSE ("GPL" );/* packet receiver */
drivers/net/arcnet/arcnet.c +9 -39
69 lines not on this page · raw message
drivers/net/arcnet/com20020-isa.c +0 -4
@@ -54,10 +54,6 @@unsigned long airqmask;struct arcnet_local *lp = dev->priv; -#ifndef MODULE -arcnet_init (); -#endif -BUGLVL (D_NORMAL)printk (VERSION); ioaddr = dev->base_addr;
drivers/net/arcnet/com20020-pci.c +0 -3
@@ -183,9 +183,6 @@static int __init com20020pci_init (void ) {BUGLVL (D_NORMAL)printk (VERSION); -#ifndef MODULE -arcnet_init (); -#endif return pci_module_init (&com20020pci_driver); }
drivers/net/arcnet/com90io.c +0 -4
@@ -151,10 +151,6 @@int ioaddr = dev->base_addr, status;unsigned long airqmask; -#ifndef MODULE -arcnet_init (); -#endif -BUGLVL (D_NORMAL)printk (VERSION); BUGLVL(D_NORMAL) printk("E-mail me if you actually test this driver, please!\n");
drivers/net/arcnet/com90xx.c +13 -28
105 lines not on this page · raw message
drivers/net/arcnet/rfc1051.c +7 -14
@@ -53,8 +53,10 @@ }; -void __init arcnet_rfc1051_init (void ) +static int __init arcnet_rfc1051_init (void ) { +printk (VERSION ); + arc_proto_map[ARC_P_IP_RFC1051 ] = arc_proto_map[ARC_P_ARP_RFC1051 ] = &rfc1051_proto;
@@ -63,27 +65,18 @@if (arc_bcast_proto == arc_proto_default) arc_bcast_proto = &rfc1051_proto; -} - - -#ifdef MODULE - -MODULE_LICENSE ("GPL" ); - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_rfc1051_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_rfc1051_exit(void) {arcnet_unregister_proto (&rfc1051_proto); } -#endif /* MODULE */ +module_init (arcnet_rfc1051_init); +module_exit (arcnet_rfc1051_exit); +MODULE_LICENSE ("GPL" );/* * Determine a packet's protocol ID.
drivers/net/arcnet/rfc1201.c +6 -14
@@ -53,8 +53,10 @@ }; -void __init arcnet_rfc1201_init (void ) +static int __init arcnet_rfc1201_init (void ) { +printk (VERSION ); + arc_proto_map[ARC_P_IP ] = arc_proto_map[ARC_P_IPV6 ] = arc_proto_map[ARC_P_ARP ]
@@ -66,27 +68,17 @@/* if someone else already owns the broadcast, we won't take it */ if (arc_bcast_proto == arc_proto_default) arc_bcast_proto = &rfc1201_proto; -} - - -#ifdef MODULE -MODULE_LICENSE ("GPL" ); - -int __init init_module (void ) -{ -printk (VERSION ); -arcnet_rfc1201_init ();return 0 ; } -void cleanup_module (void ) +static void __exit arcnet_rfc1201_exit(void) {arcnet_unregister_proto (&rfc1201_proto); } -#endif /* MODULE */ - +module_init (arcnet_rfc1201_init); +module_exit (arcnet_rfc1201_exit);/* * Determine a packet's protocol ID.
include/linux/arcdevice.h +0 -9
@@ -333,14 +333,5 @@void arcdev_setup (struct net_device *dev);void arcnet_rx (struct net_device *dev,int bufnum); -void arcnet_init (void ); - -void arcnet_rfc1201_init (void ); -void arcnet_rfc1051_init (void ); -void arcnet_raw_init (void ); - -int com90xx_probe (struct net_device *dev); -#endif /* __KERNEL__ */ -#endif /* _LINUX_ARCDEVICE_H */