From: Christoph Hellwig On Wed, Dec 14, 2005 at 01:07:14PM +0100, Martin Schwidefsky wrote: > > Looks better but still doesn't work. The dasd driver specific ioctls do > work but there are some generic ones that are only available on the > normal ioctl path, including BLKFLSBUF, BLKROSET and HDIO_GETGEO. That > makes e.g. the 32 bit version of fdasd fail with "IOCTL error". Sorry, that's the ENOIOCTLCMD thing again, I forgot it in the first revision of the last patch aswell. Here's the fix for that: Cc: Martin Schwidefsky Signed-off-by: Andrew Morton --- drivers/s390/block/dasd_ioctl.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/s390/block/dasd_ioctl.c~add-compat_ioctl-to-dasd-fix drivers/s390/block/dasd_ioctl.c --- 25/drivers/s390/block/dasd_ioctl.c~add-compat_ioctl-to-dasd-fix Wed Dec 14 13:55:49 2005 +++ 25-akpm/drivers/s390/block/dasd_ioctl.c Wed Dec 14 13:55:49 2005 @@ -127,7 +127,7 @@ dasd_compat_ioctl(struct file *filp, uns rval = dasd_ioctl(filp->f_dentry->d_inode, filp, cmd, arg); unlock_kernel(); - return rval; + return (rval == -EINVAL) ? -ENOIOCTLCMD : rval; } static int _