aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy_ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-28 17:14:59 +0100
committerArnd Bergmann <arnd@arndb.de>2020-01-03 09:42:52 +0100
commit1df23c6fe5b0654ece219985a0c32e40b100bd9a (patch)
treee371a8ed355a6abbf2e630f9712dedeeba5aa144 /drivers/ide/ide-floppy_ioctl.c
parentcompat_ioctl: scsi: handle HDIO commands from drivers (diff)
downloadlinux-dev-1df23c6fe5b0654ece219985a0c32e40b100bd9a.tar.xz
linux-dev-1df23c6fe5b0654ece219985a0c32e40b100bd9a.zip
compat_ioctl: move HDIO ioctl handling into drivers/ide
Most of the HDIO ioctls are only used by the obsolete drivers/ide subsystem, these can be handled by changing ide_cmd_ioctl() to be aware of compat mode and doing the correct transformations in place and using it as both native and compat handlers for all drivers. The SCSI drivers implementing the same commands are already doing this in the drivers, so the compat_blkdev_driver_ioctl() function is no longer needed now. The BLKSECTSET and HDIO_GETGEO_BIG ioctls are not implemented in any driver any more and no longer need any conversion. Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/ide/ide-floppy_ioctl.c')
-rw-r--r--drivers/ide/ide-floppy_ioctl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c
index 4fd70f804d6f..39a790ac6cc3 100644
--- a/drivers/ide/ide-floppy_ioctl.c
+++ b/drivers/ide/ide-floppy_ioctl.c
@@ -329,10 +329,9 @@ int ide_floppy_compat_ioctl(ide_drive_t *drive, struct block_device *bdev,
if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND)
err = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
- /*
- * there is no generic_ide_compat_ioctl(), that is handled
- * through compat_blkdev_ioctl().
- */
+ if (err == -ENOTTY)
+ err = generic_ide_ioctl(drive, bdev, cmd, arg);
+
out:
mutex_unlock(&ide_floppy_ioctl_mutex);
return err;