Commit 148747b7 authored by Jens Axboe's avatar Jens Axboe

[PATCH] make calling scsi_cmd_ioctl() part of generic cdrom_ioctl

Remove the calling of scsi_cmd_ioctl() from ide-cd.  Put it in the
uniform cdrom layer, this also makes SCSI SG_IO work.
parent 414633a6
......@@ -267,6 +267,7 @@
#include <linux/blkpg.h>
#include <linux/init.h>
#include <linux/fcntl.h>
#include <linux/blkdev.h>
#include <asm/uaccess.h>
......@@ -1465,6 +1466,11 @@ int cdrom_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
struct cdrom_device_ops *cdo = cdi->ops;
int ret;
/* Try the generic SCSI command ioctl's first.. */
ret = scsi_cmd_ioctl(ip->i_bdev, cmd, arg);
if (ret != -ENOTTY)
return ret;
/* the first few commands do not deal with audio drive_info, but
only with routines in cdrom device operations. */
switch (cmd) {
......
......@@ -3026,13 +3026,6 @@ int ide_cdrom_ioctl (ide_drive_t *drive,
struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int error;
/* Try the generic SCSI command ioctl's first.. */
error = scsi_cmd_ioctl(inode->i_bdev, cmd, arg);
if (error != -ENOTTY)
return error;
/* Then the generic cdrom ioctl's.. */
return cdrom_ioctl(inode, file, cmd, arg);
}
......
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