Re: bio and "old" block drivers

Jens Axboe (axboe@suse.de)
Wed, 12 Dec 2001 16:29:28 +0100


On Wed, Dec 12 2001, A Duston wrote:
> Jens Axboe wrote:
> >
> > On Tue, Dec 11 2001, Hal Duston wrote:
> > > I'm looking at the bio changes for ps2esdi. The driver
> > > appears to no longer work compiled when into the kernel.
> > > The ps2esdi_init call has been removed from
> > > ll_rw_blk.c:blk_dev_init. Where is the new/correct place
> > > to call this from? This appears to be the same way with
> > > many of the other "old" block drivers as well.
> >
> > Just use module_init to make this happen automagically.
>
> Sorry, I am not understanding you here. Could you spell it
> out please? My root filesystem is on the ps2esdi disk, do
> I need to set up an initrd, and load the ps2esdi driver as
> a module? Or do you mean that I should change things to
> have module_init call it even when it isn't built as a
> module? Or something else?

I mean:

--- /opt/kernel/linux-2.5.1-pre10/drivers/block/ps2esdi.c Tue Dec 11 13:30:36 2001
+++ drivers/block/ps2esdi.c Wed Dec 12 10:26:09 2001
@@ -189,6 +189,8 @@
return 0;
} /* ps2esdi_init */

+module_init(ps2esdi_init);
+
#ifdef MODULE

static int cyl[MAX_HD] = {-1,-1};

and then it will be initialized correctly. module_init isn't specific to
modules, it will work for builtin stuff too. See __initcall

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/