|
@@ -99,6 +99,8 @@
|
|
|
#include <linux/bitops.h>
|
|
|
#include <linux/mutex.h>
|
|
|
|
|
|
+#include <scsi/scsi_ioctl.h>
|
|
|
+
|
|
|
#include <asm/byteorder.h>
|
|
|
#include <asm/irq.h>
|
|
|
#include <asm/uaccess.h>
|
|
@@ -2099,7 +2101,21 @@ static int idefloppy_ioctl(struct inode *inode, struct file *file,
|
|
|
case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:
|
|
|
return idefloppy_get_format_progress(drive, argp);
|
|
|
}
|
|
|
- return generic_ide_ioctl(drive, file, bdev, cmd, arg);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * skip SCSI_IOCTL_SEND_COMMAND (deprecated)
|
|
|
+ * and CDROM_SEND_PACKET (legacy) ioctls
|
|
|
+ */
|
|
|
+ if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND)
|
|
|
+ err = scsi_cmd_ioctl(file, bdev->bd_disk->queue,
|
|
|
+ bdev->bd_disk, cmd, argp);
|
|
|
+ else
|
|
|
+ err = -ENOTTY;
|
|
|
+
|
|
|
+ if (err == -ENOTTY)
|
|
|
+ err = generic_ide_ioctl(drive, file, bdev, cmd, arg);
|
|
|
+
|
|
|
+ return err;
|
|
|
}
|
|
|
|
|
|
static int idefloppy_media_changed(struct gendisk *disk)
|