[PATCH] Re: SCSI scanning

From: Torben Mathiasen (tmm@image.dk)
Date: Sun Sep 17 2000 - 14:49:04 EST


On Sun, Sep 17 2000, Jan Niehusmann wrote:
> On Sun, Sep 17, 2000 at 09:59:30AM -0700, Linus Torvalds wrote:
> > On Sun, 17 Sep 2000, Torben Mathiasen wrote:
> > >
> > > The proper way of fixing this is to add #ifdef MODULE around the init
> > > functions or going back to init/exit_module.
> >
> > Please explain why it does it twice for compiled-in, and only once for
> > modules. There must be some other logic that does the extra
> > initializations (and that does not trigger for modules), and I'd much
> > rather just get rid of THAT thing instead.
>
> #ifdef CONFIG_BLK_DEV_SD
> scsi_register_device(&sd_template);
> #endif
>

I've attached a patch that seems to do "The Right Thing". The problem was
that the host detection routines would initialize the upper layers of scsi
drivers (sd/st/sr), and then the module_init routines would
do it again. I've removed this so now all device initialization is
done through the module_init stuff. Now this change has required all upper
layers to use this init method, and the patch therefore also updates st.

I've done some testing the last few hours with different configs to be sure
nothing breaks, but to be absolutely sure I've CC'ed Eric to verify. This
change makes the upper layers initialize a litte later when the initcall
functions are called.

-- 
Torben Mathiasen <tmm@image.dk>
Linux ThunderLAN maintainer 
http://tlan.kernel.dk


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



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:16 EST