aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:59 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:59 -0400
commit89636af25d75d8672aea05d258be357d0dc4bd70 (patch)
treedc1960bb144f76c75e82928ed3d601b52a275999 /drivers/ide/ide.c
parent4bf9fdf7f21f118e2c5052ec8e46faf00eb5a4ea (diff)
ide: add support for SCSI ioctls to ide-floppy
Now that ide-floppy supports SG_IO we can add support for SCSI ioctls (except deprecated SCSI_IOCTL_SEND_COMMAND and legacy CDROM_SEND_PACKET ones - we can add them later iff really needed). While at it remove handling of CDROMEJECT and CDROMCLOSETRAY ioctls from generic_ide_ioctl(): - This prevents ide-{disk,tape,scsi} device drivers from obtaining REQ_TYPE_BLOCK_PC type requests which are currently unsupported by these drivers and which are potentially harmful (as reported by Andrew). - There is no functionality loss since aforementioned ioctls will now be handled by idefloppy_ioctl()->scsi_cmd_ioctl() (for devices using ide-floppy driver) and by idecd_ioctl->cdrom_ioctl()->scsi_cmd_ioctl() (for devices using ide-cd driver). Cc: Jens Axboe <jens.axboe@oracle.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c438cc314238..5e88a060df06 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1097,10 +1097,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
1097 return 0; 1097 return 0;
1098 } 1098 }
1099 1099
1100 case CDROMEJECT:
1101 case CDROMCLOSETRAY:
1102 return scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p);
1103
1104 case HDIO_GET_BUSSTATE: 1100 case HDIO_GET_BUSSTATE:
1105 if (!capable(CAP_SYS_ADMIN)) 1101 if (!capable(CAP_SYS_ADMIN))
1106 return -EACCES; 1102 return -EACCES;