make scsi_wait_scan always modular
PATCH 1/1 make scsi_wait_scan always modular
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
drivers/scsi/Kconfig +6 -0
@@ -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
drivers/scsi/Makefile +1 -1
@@ -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 \
Hi
Quoted 30 lines · James Bottomley
Currently
scsi_wait_scanis only built modular if SCSI is modular. However, it's perfectly possible for a built in SCSI still to have modular drivers and thus needscsi_wait_scanas a module. Therefore,scsi_wait_scanshould always be built as a module (unless the kernel doesn't support modules).James
drivers/scsi/Kconfig +6
-0@@ -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 SCSIdrivers/scsi/Makefile +0
-0
drivers/scsi/Makefile obj-$(CONFIG_CHR_DEV_SCH) += ch.o · line 148
Quoted 5 lines
drivers/scsi/Makefile +1
-1@@ -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
Quoted 3 lines · Guennadi Liakhovetski
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
Quoted 7 lines · James Bottomley
Quoted 3 lines · Guennadi Liakhovetski
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_scanwithout 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
Quoted 6 lines · Guennadi Liakhovetski
Quoted 5 lines · James Bottomley
Quoted 3 lines · Guennadi Liakhovetski
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...
Quoted 8 lines
Quoted 2 lines
I'll do something about that if you can tell me how one might use
scsi_wait_scanwithout 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_scanwould mean that you might allow async scan, but then some time atlate_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
Quoted 3 lines · James Bottomley
scsi_wait_scanis designed to be a module that is loaded *after* you've loaded all HBA modules that doesn't return frommodule_inituntil the scans previously launched by the HBA module insertions are complete.
sure
Quoted 4 lines
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 whatscsi_wait_scanis).
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
Quoted 2 lines
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