aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 13:50:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 13:50:19 -0400
commite245befce7af0a1e1347079ed62695b059594bd4 (patch)
tree08270a503c8945b4e6ba142728dc289de2b55542 /drivers/ide/ide.c
parent14dc5249728ff699b1ca4dac01ad416a350a147a (diff)
parent58ff411e0d21592565ac9ab34f33a434f26e018b (diff)
Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block: (25 commits) bsg: Kconfig updates bsg: add SCSI transport-level request support bsg: add bidi support add a struct request pointer to the request structure bsg: fix the deadlock on discarding done commands bsg: fix a blocking read bug bsg: minor bug fixes improve bsg device allocation bind bsg to all SCSI devices bsg: bind bsg to request_queue instead of gendisk bsg: add a request_queue argument to scsi_cmd_ioctl() bsg: simplify __bsg_alloc_command failpath bsg: add cheasy error checks for sysfs stuff Add queue resizing support Replace s32, u32 and u64 with __s32, __u32 and __u64 in bsg.h for userspace bsg: silence a bogus gcc warning bsg: style cleanup bsg: use u32 etc instead of uint32_t bsg: add SG_IO to SG v4 bsg: replace SG v3 with SG v4 ...
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index c948a5c17a5d..8cd7694593c9 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1049,9 +1049,13 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
1049 unsigned long flags; 1049 unsigned long flags;
1050 ide_driver_t *drv; 1050 ide_driver_t *drv;
1051 void __user *p = (void __user *)arg; 1051 void __user *p = (void __user *)arg;
1052 int err = 0, (*setfunc)(ide_drive_t *, int); 1052 int err, (*setfunc)(ide_drive_t *, int);
1053 u8 *val; 1053 u8 *val;
1054 1054
1055 err = scsi_cmd_ioctl(file, bdev->bd_disk->queue, bdev->bd_disk, cmd, p);
1056 if (err != -ENOTTY)
1057 return err;
1058
1055 switch (cmd) { 1059 switch (cmd) {
1056 case HDIO_GET_32BIT: val = &drive->io_32bit; goto read_val; 1060 case HDIO_GET_32BIT: val = &drive->io_32bit; goto read_val;
1057 case HDIO_GET_KEEPSETTINGS: val = &drive->keep_settings; goto read_val; 1061 case HDIO_GET_KEEPSETTINGS: val = &drive->keep_settings; goto read_val;
@@ -1171,10 +1175,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
1171 return 0; 1175 return 0;
1172 } 1176 }
1173 1177
1174 case CDROMEJECT:
1175 case CDROMCLOSETRAY:
1176 return scsi_cmd_ioctl(file, bdev->bd_disk, cmd, p);
1177
1178 case HDIO_GET_BUSSTATE: 1178 case HDIO_GET_BUSSTATE:
1179 if (!capable(CAP_SYS_ADMIN)) 1179 if (!capable(CAP_SYS_ADMIN))
1180 return -EACCES; 1180 return -EACCES;