Re: [PATCH] Re: SCSI scanning

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sun Sep 17 2000 - 19:57:19 EST


On Sun, 17 Sep 2000, Torben Mathiasen wrote:
>
> 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.

Looks good, and cleans up the code.

I _also_ suspect that this change should mean that all of the templates
should become local objects, and that we should thus make sd_template,
sr_template and st_template be static to their own files. As far as I can
tell, there is no reason to export them - they were only exported due to
the extra initialization.

> 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.

Note that if this breaks, then the module case must have been broken
already, so I'd call this a fairly safe change, in addition to cleaning
the code up. The only thing to look out for is linking order (which is the
same as "module load order" for a module), and sd.o, st.o and sr.o are all
linked at the top as far as I can see.

This is the patch I was looking for. Thanks,

                Linus

-
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:15 EST