aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/block/dasd_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/dasd_ioctl.c')
-rw-r--r--drivers/s390/block/dasd_ioctl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index e3ad34686444..bb6caf46bbd9 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -448,7 +448,14 @@ dasd_ioctl(struct inode *inode, struct file *file,
case DASDAPIVER:
return dasd_ioctl_api_version(argp);
default:
- /* resort to the deprecated dynamic ioctl list */
+ /* if the discipline has an ioctl method try it. */
+ if (device->discipline->ioctl) {
+ int rval = device->discipline->ioctl(device, cmd, argp);
+ if (rval != -ENOIOCTLCMD)
+ return rval;
+ }
+
+ /* else resort to the deprecated dynamic ioctl list */
list_for_each_entry(ioctl, &dasd_ioctl_list, list) {
if (ioctl->no == cmd) {
/* Found a matching ioctl. Call it. */