Commit e9ee7fea authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

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.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dba7688f
...@@ -74,7 +74,6 @@ config N64CART ...@@ -74,7 +74,6 @@ config N64CART
config CDROM config CDROM
tristate tristate
select BLK_SCSI_REQUEST
config GDROM config GDROM
tristate "SEGA Dreamcast GD-ROM drive" tristate "SEGA Dreamcast GD-ROM drive"
......
...@@ -27,7 +27,6 @@ config PARIDE_PCD ...@@ -27,7 +27,6 @@ config PARIDE_PCD
tristate "Parallel port ATAPI CD-ROMs" tristate "Parallel port ATAPI CD-ROMs"
depends on PARIDE depends on PARIDE
select CDROM select CDROM
select BLK_SCSI_REQUEST # only for the generic cdrom code
help help
This option enables the high-level driver for ATAPI CD-ROM devices This option enables the high-level driver for ATAPI CD-ROM devices
connected through a parallel port. If you chose to build PARIDE connected through a parallel port. If you chose to build PARIDE
......
...@@ -3357,13 +3357,6 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev, ...@@ -3357,13 +3357,6 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int ret; int ret;
/*
* Try the generic SCSI command ioctl's first.
*/
ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
if (ret != -ENOTTY)
return ret;
switch (cmd) { switch (cmd) {
case CDROMMULTISESSION: case CDROMMULTISESSION:
return cdrom_ioctl_multisession(cdi, argp); return cdrom_ioctl_multisession(cdi, argp);
......
...@@ -579,6 +579,9 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, ...@@ -579,6 +579,9 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
case SCSI_IOCTL_GET_BUS_NUMBER: case SCSI_IOCTL_GET_BUS_NUMBER:
break; break;
default: default:
ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
if (ret != -ENOTTY)
goto put;
ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg); ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg);
if (ret != -ENOSYS) if (ret != -ENOSYS)
goto put; goto put;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment