diff mbox series

cdrom: always select BLK_SCSI_REQUEST

Message ID 20171103224833.3921968-1-arnd@arndb.de
State New
Headers show
Series cdrom: always select BLK_SCSI_REQUEST | expand

Commit Message

Arnd Bergmann Nov. 3, 2017, 10:48 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/block/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.9.0

Comments

Bart Van Assche Nov. 3, 2017, 10:55 p.m. UTC | #1
On Fri, 2017-11-03 at 23:48 +0100, Arnd Bergmann wrote:
> 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.
Arnd Bergmann Nov. 3, 2017, 11:02 p.m. UTC | #2
On Fri, Nov 3, 2017 at 11:55 PM, Bart Van Assche <Bart.VanAssche@wdc.com> wrote:
> On Fri, 2017-11-03 at 23:48 +0100, Arnd Bergmann wrote:

>> 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
diff mbox series

Patch

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index e84432df1a55..b8d9fcbe4020 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -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!