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

scsi: cdrom: Remove the call to scsi_cmd_blk_ioctl() from cdrom_ioctl()

Only the sr driver can handle SCSI passthrough requests, so move the call
to scsi_cmd_blk_ioctl() there.

Link: https://lore.kernel.org/r/20210724072033.1284840-9-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
e9ee7fea dba7688f

+3 -9
-1
drivers/block/Kconfig
··· 74 74 75 75 config CDROM 76 76 tristate 77 - select BLK_SCSI_REQUEST 78 77 79 78 config GDROM 80 79 tristate "SEGA Dreamcast GD-ROM drive"
-1
drivers/block/paride/Kconfig
··· 27 27 tristate "Parallel port ATAPI CD-ROMs" 28 28 depends on PARIDE 29 29 select CDROM 30 - select BLK_SCSI_REQUEST # only for the generic cdrom code 31 30 help 32 31 This option enables the high-level driver for ATAPI CD-ROM devices 33 32 connected through a parallel port. If you chose to build PARIDE
-7
drivers/cdrom/cdrom.c
··· 3357 3357 void __user *argp = (void __user *)arg; 3358 3358 int ret; 3359 3359 3360 - /* 3361 - * Try the generic SCSI command ioctl's first. 3362 - */ 3363 - ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); 3364 - if (ret != -ENOTTY) 3365 - return ret; 3366 - 3367 3360 switch (cmd) { 3368 3361 case CDROMMULTISESSION: 3369 3362 return cdrom_ioctl_multisession(cdi, argp);
+3
drivers/scsi/sr.c
··· 579 579 case SCSI_IOCTL_GET_BUS_NUMBER: 580 580 break; 581 581 default: 582 + ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); 583 + if (ret != -ENOTTY) 584 + goto put; 582 585 ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg); 583 586 if (ret != -ENOSYS) 584 587 goto put;