From: Damien Le Moal <damien.lemoal@wdc.com>
Date: Wed, 28 Jun 2017 14:58:56 +0900
Subject: target: Use macro for WRITE_VERIFY_32 operation codes
Git-commit: e5dc9a7055c98bcd7b03f9735d5f2ec2b7f0d897
Patch-mainline: v4.13-rc1
References: fate#323946
Add WRITE_VERIFY_32 definition to scsi prototypes and use this macro
definition isntead of the hard coded value.
(Drop WRITE_VERIFY_16 that's already part of another patch - nab)
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Acked-by: Lee Duncan <lduncan@suse.com>
---
drivers/target/target_core_device.c | 2 +-
include/scsi/scsi_proto.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index bbcef3bc66c8..1c7c57a3c52e 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -1226,7 +1226,7 @@ void core_dev_release_virtual_lun0(void)
switch (get_unaligned_be16(&cdb[8])) {
case READ_32:
case WRITE_32:
- case 0x0c: /* WRITE_VERIFY_32 */
+ case WRITE_VERIFY_32:
case XDWRITEREAD_32:
cmd->se_cmd_flags |= SCF_SCSI_DATA_CDB;
break;
diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h
index ce78ec8e367d..5e3fe037938e 100644
--- a/include/scsi/scsi_proto.h
+++ b/include/scsi/scsi_proto.h
@@ -161,6 +161,7 @@
#define READ_32 0x09
#define VERIFY_32 0x0a
#define WRITE_32 0x0b
+#define WRITE_VERIFY_32 0x0c
#define WRITE_SAME_32 0x0d
/* Values for T10/04-262r7 */