summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c1
-rw-r--r--drivers/ide/ide-disk.c1
-rw-r--r--drivers/ide/ide-floppy.c1
-rw-r--r--drivers/ide/ide-tape.c1
-rw-r--r--drivers/ide/ide.c11
5 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 1f5652326489..7ea90de55058 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1969,7 +1969,6 @@ static ide_driver_t ide_cdrom_driver = {
.remove = ide_cd_remove,
.version = IDECD_VERSION,
.media = ide_cdrom,
- .supports_dsc_overlap = 1,
.do_request = ide_cd_do_request,
.end_request = ide_end_request,
.error = __ide_error,
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 474070c1ddb6..08f47cb13425 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -980,7 +980,6 @@ static ide_driver_t idedisk_driver = {
.shutdown = ide_device_shutdown,
.version = IDEDISK_VERSION,
.media = ide_disk,
- .supports_dsc_overlap = 0,
.do_request = ide_do_rw_disk,
.end_request = ide_end_request,
.error = __ide_error,
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 673644fdb6f2..de8d42b3f698 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -1130,7 +1130,6 @@ static ide_driver_t idefloppy_driver = {
.remove = ide_floppy_remove,
.version = IDEFLOPPY_VERSION,
.media = ide_floppy,
- .supports_dsc_overlap = 0,
.do_request = idefloppy_do_request,
.end_request = idefloppy_end_request,
.error = __ide_error,
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7037accb0589..1fc1c2a6888f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2607,7 +2607,6 @@ static ide_driver_t idetape_driver = {
.remove = ide_tape_remove,
.version = IDETAPE_VERSION,
.media = ide_tape,
- .supports_dsc_overlap = 1,
.do_request = idetape_do_request,
.end_request = idetape_end_request,
.error = __ide_error,
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 5b3bfc78dcdd..4d0c661e78a5 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -562,7 +562,6 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
unsigned int cmd, unsigned long arg)
{
unsigned long flags;
- ide_driver_t *drv;
int err = 0, (*getfunc)(ide_drive_t *), (*setfunc)(ide_drive_t *, int);
switch (cmd) {
@@ -612,12 +611,12 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device
if (!capable(CAP_SYS_ADMIN)) return -EACCES;
if (arg != (arg & ((1 << IDE_NICE_DSC_OVERLAP) | (1 << IDE_NICE_1))))
return -EPERM;
- drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1;
- drv = *(ide_driver_t **)bdev->bd_disk->private_data;
- if (drive->dsc_overlap && !drv->supports_dsc_overlap) {
- drive->dsc_overlap = 0;
+ if (((arg >> IDE_NICE_DSC_OVERLAP) & 1) &&
+ (drive->media == ide_disk ||
+ drive->media == ide_floppy ||
+ drive->scsi))
return -EPERM;
- }
+ drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1;
drive->nice1 = (arg >> IDE_NICE_1) & 1;
return 0;
case HDIO_DRIVE_RESET:
OpenPOWER on IntegriCloud