From: Ryan C. Underwood Date: Fri, 25 Dec 2015 05:45:27 +0000 (-0800) Subject: 3w-xxxx: Pass through compat mode ioctls X-Git-Tag: v4.5-rc1~17^2^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4f44f35dd8cf0818c51f399611ef868ebfdaccba;p=users%2Fjedix%2Flinux-maple.git 3w-xxxx: Pass through compat mode ioctls This allows 32-bit userspace tools (tw_cli, smartctl) to work on a 64-bit system. The command buffer is opaque to us, so, no word size problems. Signed-off-by: Ryan C. Underwood Reviewed-by: Shane Seymour Reviewed-by: Matthew R. Ochs Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 2940bd769936c..25aba1613e215 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -1045,6 +1045,9 @@ static int tw_chrdev_open(struct inode *inode, struct file *file) static const struct file_operations tw_fops = { .owner = THIS_MODULE, .unlocked_ioctl = tw_chrdev_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = tw_chrdev_ioctl, +#endif .open = tw_chrdev_open, .release = NULL, .llseek = noop_llseek,