Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi_dh: force modular build if SCSI is a module

When the scsi_dh core was moved into the scsi core module,
CONFIG_SCSI_DH became a 'bool' option, and now anything depending on it
can be built-in even when CONFIG_SCSI=m. This of course cannot link
successfully:

drivers/scsi/built-in.o: In function `rdac_init':
scsi_dh_alua.c:(.init.text+0x14): undefined reference to `scsi_register_device_handler'
scsi_dh_alua.c:(.init.text+0x64): undefined reference to `scsi_unregister_device_handler'
drivers/scsi/built-in.o: In function `alua_init':
scsi_dh_alua.c:(.init.text+0xb0): undefined reference to `scsi_register_device_handler'

As a workaround, this adds an extra dependency on CONFIG_SCSI, so
Kconfig can figure out whether built-in is allowed or not.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 086b91d052eb ("scsi_dh: integrate into the core SCSI code")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arnd Bergmann and committed by
Martin K. Petersen
0c994c03 ec54adfb

+4 -4
+4 -4
drivers/scsi/device_handler/Kconfig
··· 13 13 14 14 config SCSI_DH_RDAC 15 15 tristate "LSI RDAC Device Handler" 16 - depends on SCSI_DH 16 + depends on SCSI_DH && SCSI 17 17 help 18 18 If you have a LSI RDAC select y. Otherwise, say N. 19 19 20 20 config SCSI_DH_HP_SW 21 21 tristate "HP/COMPAQ MSA Device Handler" 22 - depends on SCSI_DH 22 + depends on SCSI_DH && SCSI 23 23 help 24 24 If you have a HP/COMPAQ MSA device that requires START_STOP to 25 25 be sent to start it and cannot upgrade the firmware then select y. ··· 27 27 28 28 config SCSI_DH_EMC 29 29 tristate "EMC CLARiiON Device Handler" 30 - depends on SCSI_DH 30 + depends on SCSI_DH && SCSI 31 31 help 32 32 If you have a EMC CLARiiON select y. Otherwise, say N. 33 33 34 34 config SCSI_DH_ALUA 35 35 tristate "SPC-3 ALUA Device Handler" 36 - depends on SCSI_DH 36 + depends on SCSI_DH && SCSI 37 37 help 38 38 SCSI Device handler for generic SPC-3 Asymmetric Logical Unit 39 39 Access (ALUA).