public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make scsi_wait_scan always modular
@ 2007-03-11 19:16 James Bottomley
  2007-03-11 20:56 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-03-11 19:16 UTC (permalink / raw)
  To: linux-scsi

Currently scsi_wait_scan is only built modular if SCSI is modular.
However, it's perfectly possible for a built in SCSI still to have
modular drivers and thus need scsi_wait_scan as a module.  Therefore,
scsi_wait_scan should always be built as a module (unless the kernel
doesn't support modules).

James

diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4cd280e..f3bc0f4 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -241,6 +241,12 @@ config SCSI_SCAN_ASYNC
 	  You can override this choice by specifying "scsi_mod.scan=sync"
 	  or async on the kernel's command line.
 
+config SCSI_WAIT_SCAN
+	tristate
+	default m
+	depends on SCSI
+	depends on MODULES
+
 menu "SCSI Transports"
 	depends on SCSI
 
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 79ecf4e..41c7883 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -145,7 +145,7 @@ obj-$(CONFIG_CHR_DEV_SCH)	+= ch.o
 # This goes last, so that "real" scsi devices probe earlier
 obj-$(CONFIG_SCSI_DEBUG)	+= scsi_debug.o
 
-obj-$(CONFIG_SCSI)		+= scsi_wait_scan.o
+obj-$(CONFIG_SCSI_WAIT_SCAN)	+= scsi_wait_scan.o
 
 scsi_mod-y			+= scsi.o hosts.o scsi_ioctl.o constants.o \
 				   scsicam.o scsi_error.o scsi_lib.o \



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] make scsi_wait_scan always modular
  2007-03-11 19:16 [PATCH] make scsi_wait_scan always modular James Bottomley
@ 2007-03-11 20:56 ` Guennadi Liakhovetski
  2007-03-11 21:06   ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2007-03-11 20:56 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

Hi

On Sun, 11 Mar 2007, James Bottomley wrote:

> Currently scsi_wait_scan is only built modular if SCSI is modular.
> However, it's perfectly possible for a built in SCSI still to have
> modular drivers and thus need scsi_wait_scan as a module.  Therefore,
> scsi_wait_scan should always be built as a module (unless the kernel
> doesn't support modules).
> 
> James
> 
> diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
> index 4cd280e..f3bc0f4 100644
> --- a/drivers/scsi/Kconfig
> +++ b/drivers/scsi/Kconfig
> @@ -241,6 +241,12 @@ config SCSI_SCAN_ASYNC
>  	  You can override this choice by specifying "scsi_mod.scan=sync"
>  	  or async on the kernel's command line.
>  
> +config SCSI_WAIT_SCAN
> +	tristate
> +	default m
> +	depends on SCSI
> +	depends on MODULES
> +
>  menu "SCSI Transports"
>  	depends on SCSI
>  
> diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
> index 79ecf4e..41c7883 100644
> --- a/drivers/scsi/Makefile
> +++ b/drivers/scsi/Makefile
> @@ -145,7 +145,7 @@ obj-$(CONFIG_CHR_DEV_SCH)	+= ch.o
>  # This goes last, so that "real" scsi devices probe earlier
>  obj-$(CONFIG_SCSI_DEBUG)	+= scsi_debug.o
>  
> -obj-$(CONFIG_SCSI)		+= scsi_wait_scan.o
> +obj-$(CONFIG_SCSI_WAIT_SCAN)	+= scsi_wait_scan.o

Which means, with this change you cannot build a kernel without module 
support but with scsi_wait_scan, which was possible before. Don't know if 
anybody would ever want to do this though...

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make scsi_wait_scan always modular
  2007-03-11 20:56 ` Guennadi Liakhovetski
@ 2007-03-11 21:06   ` James Bottomley
  2007-03-11 21:17     ` Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-03-11 21:06 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-scsi

On Sun, 2007-03-11 at 21:56 +0100, Guennadi Liakhovetski wrote:
> Which means, with this change you cannot build a kernel without module 
> support but with scsi_wait_scan, which was possible before. Don't know if 
> anybody would ever want to do this though...

I'll do something about that if you can tell me how one might use
scsi_wait_scan without module support in the kernel ...

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make scsi_wait_scan always modular
  2007-03-11 21:06   ` James Bottomley
@ 2007-03-11 21:17     ` Guennadi Liakhovetski
  2007-03-11 21:35       ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: Guennadi Liakhovetski @ 2007-03-11 21:17 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

On Sun, 11 Mar 2007, James Bottomley wrote:

> On Sun, 2007-03-11 at 21:56 +0100, Guennadi Liakhovetski wrote:
> > Which means, with this change you cannot build a kernel without module 
> > support but with scsi_wait_scan, which was possible before. Don't know if 
> > anybody would ever want to do this though...
> 
> I'll do something about that if you can tell me how one might use
> scsi_wait_scan without module support in the kernel ...

I won't:-) Just from the comment at the top of the patch I didn't get the 
impression that this indeed was its intended result. Building statically 
with scsi_wait_scan would mean that you might allow async scan, but then 
some time at late_initcall() time you want a sync point. Could this ever 
be desired? If not, just ignore my comment.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make scsi_wait_scan always modular
  2007-03-11 21:17     ` Guennadi Liakhovetski
@ 2007-03-11 21:35       ` James Bottomley
  2007-03-11 22:12         ` Guennadi Liakhovetski
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2007-03-11 21:35 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-scsi

On Sun, 2007-03-11 at 22:17 +0100, Guennadi Liakhovetski wrote:
> On Sun, 11 Mar 2007, James Bottomley wrote:
> > On Sun, 2007-03-11 at 21:56 +0100, Guennadi Liakhovetski wrote:
> > > Which means, with this change you cannot build a kernel without module 
> > > support but with scsi_wait_scan, which was possible before. Don't know if 
> > > anybody would ever want to do this though...
> > 
> > I'll do something about that if you can tell me how one might use
> > scsi_wait_scan without module support in the kernel ...
> 
> I won't:-) Just from the comment at the top of the patch I didn't get the 
> impression that this indeed was its intended result. Building statically 
> with scsi_wait_scan would mean that you might allow async scan, but then 
> some time at late_initcall() time you want a sync point. Could this ever 
> be desired? If not, just ignore my comment.

scsi_wait_scan is designed to be a module that is loaded *after* you've
loaded all HBA modules that doesn't return from module_init until the
scans previously launched by the HBA module insertions are complete.  In
a monolithic kernel, this is done by the async scan infrastructure but
in a modular kernel, you have to have some signal that you've finished
loading the SCSI modules (which is what scsi_wait_scan is).

So, if you build a kernel without module support, ipso facto you have no
SCSI modules to load and therefore you can't have a use for
scsi_wait_scan.

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make scsi_wait_scan always modular
  2007-03-11 21:35       ` James Bottomley
@ 2007-03-11 22:12         ` Guennadi Liakhovetski
  0 siblings, 0 replies; 6+ messages in thread
From: Guennadi Liakhovetski @ 2007-03-11 22:12 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi

On Sun, 11 Mar 2007, James Bottomley wrote:

> scsi_wait_scan is designed to be a module that is loaded *after* you've
> loaded all HBA modules that doesn't return from module_init until the
> scans previously launched by the HBA module insertions are complete. 

sure

> In
> a monolithic kernel, this is done by the async scan infrastructure but
> in a modular kernel, you have to have some signal that you've finished
> loading the SCSI modules (which is what scsi_wait_scan is).

So, if now (before this patch) you build a monolithic kernel, 
scsi_wait_scan will be built in, scsi_complete_async_scans() will be 
called at late_initcall time, but it will be redundant because 

> In
> a monolithic kernel, this is done by the async scan infrastructure

so, it will just have no effect, right?

If so, then, of course it only makes sense as a module.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-11 22:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 19:16 [PATCH] make scsi_wait_scan always modular James Bottomley
2007-03-11 20:56 ` Guennadi Liakhovetski
2007-03-11 21:06   ` James Bottomley
2007-03-11 21:17     ` Guennadi Liakhovetski
2007-03-11 21:35       ` James Bottomley
2007-03-11 22:12         ` Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox