Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1985026d32e69ed6dac3ba0ef8ff10366f060ed3 Commit: 1985026d32e69ed6dac3ba0ef8ff10366f060ed3 Parent: 8b0d4164b4ac151050953d78c97fcceade69eb3c Author: Linus Torvalds <[EMAIL PROTECTED]> AuthorDate: Tue Jul 17 15:57:42 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Jul 17 15:57:42 2007 -0700
Revert drivers/ide/ide.c scsi_cmd_ioctl() usage changes The old IDE driver is not ready to take generic SCSI commands, even if it uses them for some specific issues (ie the tray open/close ioctls for IDE CD-ROM's). Pointed out by Bartlomiej. I'm sure we'll have it fixed properly soon enough, but for now we should not allow it to cause problems. Cc: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]> Cc: Jens Axboe <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/ide/ide.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 8cd7694..077fb67 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1049,13 +1049,9 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device unsigned long flags; ide_driver_t *drv; void __user *p = (void __user *)arg; - int err, (*setfunc)(ide_drive_t *, int); + int err = 0, (*setfunc)(ide_drive_t *, int); u8 *val; - err = scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p); - if (err != -ENOTTY) - return err; - switch (cmd) { case HDIO_GET_32BIT: val = &drive->io_32bit; goto read_val; case HDIO_GET_KEEPSETTINGS: val = &drive->keep_settings; goto read_val; @@ -1175,6 +1171,10 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device return 0; } + case CDROMEJECT: + case CDROMCLOSETRAY: + return scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p); + case HDIO_GET_BUSSTATE: if (!capable(CAP_SYS_ADMIN)) return -EACCES; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html