Skip to contentSkip to conversation

cdrom: always select BLK_SCSI_REQUEST

PATCH In review Arnd Bergmann 2 participants 3 messages Nov 3, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cdrom: always select BLK_SCSI_REQUEST

When CDROM is enabled, but nothing else selects BLK_SCSI_REQUEST, we get this link error:

cdrom.c:(.text+0x7a18): undefined reference to `scsi_cmd_blk_ioctl'

The problem is that the CDROM helper code has become user-selectable now when it used to only be compiled if anything else enabled it. This moves the 'select BLK_SCSI_REQUEST' from the drivers that explicitly have it into CONFIG_CDROM, to make sure we always build that code.

Fixes 2a750166a5be ("block: Rework drivers/cdrom/Makefile")
---
 drivers/block/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/block/Kconfig +2 -3
index e84432df1a55..b8d9fcbe4020 100644
@@ -69,7 +69,8 @@ config AMIGA_Z2RAM
 	  module will be called z2ram.
 
 config CDROM
-	tristate "CD-ROM driver"
+	tristate
+	select BLK_SCSI_REQUEST
 	help
 	  A CD-ROM is a pre-pressed optical compact disc which contains
 	  data. The name is an acronym which stands for "Compact Disc
@@ -82,7 +83,6 @@ config GDROM
 	tristate "SEGA Dreamcast GD-ROM drive"
 	depends on SH_DREAMCAST
 	select CDROM
-	select BLK_SCSI_REQUEST # only for the generic cdrom code
 	help
 	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
 	  "GD-ROM" by SEGA to signify it is capable of reading special disks
@@ -360,7 +360,6 @@ config CDROM_PKTCDVD
 	tristate "Packet writing on CD/DVD media (DEPRECATED)"
 	depends on !UML
 	select CDROM
-	select BLK_SCSI_REQUEST
 	help
 	  Note: This driver is deprecated and will be removed from the
 	  kernel in the near future!
Signature · 1 line
2.9.0
#1 lore raw
Quoted 4 lines · Arnd Bergmann

When CDROM is enabled, but nothing else selects BLK_SCSI_REQUEST, we get this link error:

cdrom.c:(.text+0x7a18): undefined reference to `scsi_cmd_blk_ioctl'

Hello Arnd,

Can you check whether this issue still occurs with Jens' for-4.15/block branch (commit a116895fc7b6)?

Thanks,

Bart.

#2 lore raw
Quoted 10 lines · Bart Van Assche
Quoted 4 lines · Arnd Bergmann

When CDROM is enabled, but nothing else selects BLK_SCSI_REQUEST, we get this link error:

cdrom.c:(.text+0x7a18): undefined reference to `scsi_cmd_blk_ioctl'

Hello Arnd,

Can you check whether this issue still occurs with Jens' for-4.15/block branch (commit a116895fc7b6)?

I haven't tried, but that commit also look like a correct fix for this problem. We could add my patch as a micro-cleanup on top, but it should not be required any more now.

I'll drop my patch from the randconfig build and will let you know in case the problem (or something else) comes back.

Arnd