fix compile warning and initialization of static tmsisa
PATCH 1/1 fix compile warning and initialization of static tmsisa
Hi Jochen,
as already discussed some months ago the patch below contains the follosing fixes for the static compile of tmsisa:
- fixes a "`portlist' defined but not used" compile time warning by moving portlist below an #ifdef MODULE
- call tms_isa_probe in Space.c for intialization
The patch compiles against 2.5.50 and applies against 2.4.20.
Please comment on whether it's correct or not and if it's correct please apply.
TIA
Adrian
drivers/net/Space.c renamed from drivers/net/Space.c.old +4 -0
@@ -540,6 +540,7 @@#ifdef CONFIG_TR /* Token-ring device probe */ extern int ibmtr_probe (struct net_device *); +extern int tms_isa_probe (struct net_device *dev);extern int smctr_probe (struct net_device *); static int
@@ -548,6 +549,9 @@if (1 #ifdef CONFIG_IBMTR &&ibmtr_probe (dev) +#endif +#ifdef CONFIG_TMSISA + &&tms_isa_probe (dev) #endif #ifdef CONFIG_SMCTR && smctr_probe(dev)
drivers/net/tokenring/tmsisa.c renamed from drivers/net/tokenring/tmsisa.c.old +6 -6
@@ -39,12 +39,6 @@#define TMS_ISA_IO_EXTENT 32 -/* A zero-terminated list of I/O addresses to be probed. */ -static unsigned int portlist[]__initdata = { -0x0A20 ,0x1A20 ,0x0B20 ,0x1B20 ,0x0980 ,0x1980 ,0x0900 ,0x1900 ,// SK -0 -}; -/* A zero-terminated list of IRQs to be probed. * Used again after initial probe for sktr_chipset_init, called from sktr_open. */
@@ -367,6 +361,12 @@#define ISATR_MAX_ADAPTERS 3 +/* A zero-terminated list of I/O addresses to be probed. */ +static unsigned int portlist[]__initdata = { +0x0A20 ,0x1A20 ,0x0B20 ,0x1B20 ,0x0980 ,0x1980 ,0x0900 ,0x1900 ,// SK +0 +}; +static int io[ISATR_MAX_ADAPTERS ];static int irq[ISATR_MAX_ADAPTERS ];static int dma[ISATR_MAX_ADAPTERS ];
Hi Adrian,
Quoted 2 lines
Please comment on whether it's correct or not and if it's correct please apply.
It is broken, as tms_isa_probe() doesn't work on uninitialized dev structs.
Try either of these for a correct fix:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0211.0/0111.html
http://www.uwsg.iu.edu/hypermail/linux/kernel/0211.1/0537.html
(this one misses the change in Space.c though).
Currently, i can't do any newer patches as module loading is totally broken on Alpha with later kernel versions.
Cheers,
--jochen