summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@daterainc.com>2013-08-22 12:29:59 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2013-09-10 16:48:44 -0700
commit04b1b7954649767f2ab9bf08cf2457e21d5c7167 (patch)
tree2dbd495a23948dae6ba4fd60841330dd34a0d391 /drivers/target
parentcbf031f425fd0b30ff10ba83b612753189a6bbbf (diff)
downloadblackbird-op-linux-04b1b7954649767f2ab9bf08cf2457e21d5c7167.tar.gz
blackbird-op-linux-04b1b7954649767f2ab9bf08cf2457e21d5c7167.zip
target: Enable EXTENDED_COPY setup in spc_parse_cdb
Setup up the se_cmd->execute_cmd() pointers for EXTENDED_COPY and RECEIVE_COPY_RESULTS handling within spc_parse_cdb() Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Martin Petersen <martin.petersen@oracle.com> Cc: Chris Mason <chris.mason@fusionio.com> Cc: Roland Dreier <roland@purestorage.com> Cc: Zach Brown <zab@redhat.com> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_spc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index bd16a93a7a3f..894e83bc223d 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -35,7 +35,7 @@
#include "target_core_alua.h"
#include "target_core_pr.h"
#include "target_core_ua.h"
-
+#include "target_core_xcopy.h"
static void spc_fill_alua_data(struct se_port *port, unsigned char *buf)
{
@@ -1252,8 +1252,14 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
*size = (cdb[6] << 24) | (cdb[7] << 16) | (cdb[8] << 8) | cdb[9];
break;
case EXTENDED_COPY:
- case READ_ATTRIBUTE:
+ *size = get_unaligned_be32(&cdb[10]);
+ cmd->execute_cmd = target_do_xcopy;
+ break;
case RECEIVE_COPY_RESULTS:
+ *size = get_unaligned_be32(&cdb[10]);
+ cmd->execute_cmd = target_do_receive_copy_results;
+ break;
+ case READ_ATTRIBUTE:
case WRITE_ATTRIBUTE:
*size = (cdb[10] << 24) | (cdb[11] << 16) |
(cdb[12] << 8) | cdb[13];
OpenPOWER on IntegriCloud