* [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c
@ 2002-05-14 2:03 Adam Kropelin
2002-05-14 2:24 ` Keith Owens
0 siblings, 1 reply; 5+ messages in thread
From: Adam Kropelin @ 2002-05-14 2:03 UTC (permalink / raw)
To: davej; +Cc: linux-kernel
In 2.5.13-dj1, the call to cpqarray_init() in drivers/block/genhd.c was
dropped. I'm not sure what the intent was since the driver seems to work fine
as a module. In case it was a mistake, here's a patch (against 2.5.15-dj1) to
add it back in. Without it, cpqarray only works as a module. Works For Me (tm).
--Adam
--- linux-2.5.15-dj1-virgin/drivers/block/genhd.c Mon May 13 21:21:59 2002
+++ linux-2.5.15-dj1/drivers/block/genhd.c Mon May 13 21:18:48 2002
@@ -229,6 +229,9 @@
/* This has to be done before scsi_dev_init */
soc_probe();
#endif
+#ifdef CONFIG_BLK_CPQ_DA
+ cpqarray_init();
+#endif
#ifdef CONFIG_NET
net_dev_init();
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c
2002-05-14 2:03 [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c Adam Kropelin
@ 2002-05-14 2:24 ` Keith Owens
2002-05-14 2:49 ` Adam Kropelin
0 siblings, 1 reply; 5+ messages in thread
From: Keith Owens @ 2002-05-14 2:24 UTC (permalink / raw)
To: Adam Kropelin; +Cc: davej, linux-kernel
On Mon, 13 May 2002 22:03:34 -0400,
Adam Kropelin <akropel1@rochester.rr.com> wrote:
>In 2.5.13-dj1, the call to cpqarray_init() in drivers/block/genhd.c was
>dropped. I'm not sure what the intent was since the driver seems to work fine
>as a module. In case it was a mistake, here's a patch (against 2.5.15-dj1) to
>add it back in. Without it, cpqarray only works as a module. Works For Me (tm).
>
>--Adam
>
>--- linux-2.5.15-dj1-virgin/drivers/block/genhd.c Mon May 13 21:21:59 2002
>+++ linux-2.5.15-dj1/drivers/block/genhd.c Mon May 13 21:18:48 2002
>@@ -229,6 +229,9 @@
> /* This has to be done before scsi_dev_init */
> soc_probe();
> #endif
>+#ifdef CONFIG_BLK_CPQ_DA
>+ cpqarray_init();
>+#endif
> #ifdef CONFIG_NET
> net_dev_init();
> #endif
The real problem appears to be cpqarray.c, it wraps the init/exit code
in #ifdef MODULE, so the init code is only available to modules. I
think that cpqarray.c should remove the #ifdef MODULE and use the same
init mechanism as other drivers, including module_init/exit. I don't
have a card and the code is a mess so I am not going to attempt a patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c
2002-05-14 2:24 ` Keith Owens
@ 2002-05-14 2:49 ` Adam Kropelin
2002-05-14 3:31 ` Keith Owens
0 siblings, 1 reply; 5+ messages in thread
From: Adam Kropelin @ 2002-05-14 2:49 UTC (permalink / raw)
To: Keith Owens; +Cc: davej, linux-kernel
On Tue, May 14, 2002 at 12:24:23PM +1000, Keith Owens wrote:
> On Mon, 13 May 2002 22:03:34 -0400,
> Adam Kropelin <akropel1@rochester.rr.com> wrote:
> >In 2.5.13-dj1, the call to cpqarray_init() in drivers/block/genhd.c was
> >dropped. I'm not sure what the intent was since the driver seems to work fine
<snip>
> The real problem appears to be cpqarray.c, it wraps the init/exit code
> in #ifdef MODULE, so the init code is only available to modules. I
> think that cpqarray.c should remove the #ifdef MODULE and use the same
> init mechanism as other drivers, including module_init/exit. I don't
> have a card and the code is a mess so I am not going to attempt a patch.
I'm not seeing it. I see init_module() and cleanup_module() wrapped as you say
but cpqarray_init() is outside the #ifdef. Also, two versions of cpqarray_setup
are provided based on #ifdef MODULE but this doesn't look problematic to me.
I'm a newbie, for sure. Am I overlooking something obvious?
--Adam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c
2002-05-14 2:49 ` Adam Kropelin
@ 2002-05-14 3:31 ` Keith Owens
2002-05-14 11:38 ` Adam Kropelin
0 siblings, 1 reply; 5+ messages in thread
From: Keith Owens @ 2002-05-14 3:31 UTC (permalink / raw)
To: Adam Kropelin; +Cc: davej, linux-kernel
On Mon, 13 May 2002 22:49:08 -0400,
Adam Kropelin <akropel1@rochester.rr.com> wrote:
>On Tue, May 14, 2002 at 12:24:23PM +1000, Keith Owens wrote:
>> The real problem appears to be cpqarray.c, it wraps the init/exit code
>> in #ifdef MODULE, so the init code is only available to modules. I
>> think that cpqarray.c should remove the #ifdef MODULE and use the same
>> init mechanism as other drivers, including module_init/exit. I don't
>> have a card and the code is a mess so I am not going to attempt a patch.
>
>I'm not seeing it. I see init_module() and cleanup_module() wrapped as you say
>but cpqarray_init() is outside the #ifdef. Also, two versions of cpqarray_setup
>are provided based on #ifdef MODULE but this doesn't look problematic to me.
>I'm a newbie, for sure. Am I overlooking something obvious?
The call to cpqarray_init() is from init_module() which does not exist
when the code is built in. See drivers/block/loop.c for an example of
the correct use of init and exit routines, using module_init and
module_exit.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c
2002-05-14 3:31 ` Keith Owens
@ 2002-05-14 11:38 ` Adam Kropelin
0 siblings, 0 replies; 5+ messages in thread
From: Adam Kropelin @ 2002-05-14 11:38 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel, davej
On Tue, May 14, 2002 at 01:31:38PM +1000, Keith Owens wrote:
> On Mon, 13 May 2002 22:49:08 -0400,
> Adam Kropelin <akropel1@rochester.rr.com> wrote:
> >On Tue, May 14, 2002 at 12:24:23PM +1000, Keith Owens wrote:
> >> The real problem appears to be cpqarray.c, it wraps the init/exit code
> >> in #ifdef MODULE, so the init code is only available to modules. I
> >> think that cpqarray.c should remove the #ifdef MODULE and use the same
> >> init mechanism as other drivers, including module_init/exit. I don't
> >> have a card and the code is a mess so I am not going to attempt a patch.
> >
> >I'm not seeing it. I see init_module() and cleanup_module() wrapped as you say
> >but cpqarray_init() is outside the #ifdef. Also, two versions of cpqarray_setup
> >are provided based on #ifdef MODULE but this doesn't look problematic to me.
> >I'm a newbie, for sure. Am I overlooking something obvious?
>
> The call to cpqarray_init() is from init_module() which does not exist
> when the code is built in. See drivers/block/loop.c for an example of
> the correct use of init and exit routines, using module_init and
> module_exit.
Ah, I think I see your point now. The call to cpqarray_init() from genhd.c was
a hack, needed only because cpqarray doesn't use the module_init/module_exit
mechanism. Sorry I took so long to catch on and thanks for your patience.
Since I do have a card and the motivation to see this driver work when
compiled-in, I'll attempt a more correct fix tonight.
--Adam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-05-14 11:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-14 2:03 [PATCH] 2.5.1[345]-dj Add cpqarray_init() back into genhd.c Adam Kropelin
2002-05-14 2:24 ` Keith Owens
2002-05-14 2:49 ` Adam Kropelin
2002-05-14 3:31 ` Keith Owens
2002-05-14 11:38 ` Adam Kropelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.