diff mbox

[1/1] 3w-xxxx: pass through compat mode ioctls

Message ID 1451022327-26943-1-git-send-email-nemesis@icequake.net (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Ryan C. Underwood Dec. 25, 2015, 5:45 a.m. UTC
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 <nemesis@icequake.net>
---
 drivers/scsi/3w-xxxx.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Seymour, Shane M Jan. 8, 2016, 4:07 a.m. UTC | #1
Reviewed-by: Shane Seymour <shane.seymour@hpe.com> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthew R. Ochs Jan. 8, 2016, 4:32 a.m. UTC | #2
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen Jan. 8, 2016, 5:14 p.m. UTC | #3
>>>>> "Ryan" == Ryan C Underwood <nemesis@icequake.net> writes:

Ryan> This allows 32-bit userspace tools (tw_cli, smartctl) to work on a
Ryan> 64-bit system.  The command buffer is opaque to us, so, no word
Ryan> size problems.

Applied to 4.5/scsi-queue.
diff mbox

Patch

diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 2940bd7..25aba16 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,