diff options
Diffstat (limited to 'drivers/target/loopback/tcm_loop.c')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index fadad7c5f635..c886ad1c39fb 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -212,6 +212,10 @@ static void tcm_loop_submission_work(struct work_struct *work) | |||
212 | se_cmd->se_cmd_flags |= SCF_BIDI; | 212 | se_cmd->se_cmd_flags |= SCF_BIDI; |
213 | 213 | ||
214 | } | 214 | } |
215 | |||
216 | if (!scsi_prot_sg_count(sc) && scsi_get_prot_op(sc) != SCSI_PROT_NORMAL) | ||
217 | se_cmd->prot_pto = true; | ||
218 | |||
215 | rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, | 219 | rc = target_submit_cmd_map_sgls(se_cmd, tl_nexus->se_sess, sc->cmnd, |
216 | &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, | 220 | &tl_cmd->tl_sense_buf[0], tl_cmd->sc->device->lun, |
217 | scsi_bufflen(sc), tcm_loop_sam_attr(sc), | 221 | scsi_bufflen(sc), tcm_loop_sam_attr(sc), |
@@ -915,6 +919,11 @@ static void tcm_loop_queue_tm_rsp(struct se_cmd *se_cmd) | |||
915 | wake_up(&tl_tmr->tl_tmr_wait); | 919 | wake_up(&tl_tmr->tl_tmr_wait); |
916 | } | 920 | } |
917 | 921 | ||
922 | static void tcm_loop_aborted_task(struct se_cmd *se_cmd) | ||
923 | { | ||
924 | return; | ||
925 | } | ||
926 | |||
918 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) | 927 | static char *tcm_loop_dump_proto_id(struct tcm_loop_hba *tl_hba) |
919 | { | 928 | { |
920 | switch (tl_hba->tl_proto_id) { | 929 | switch (tl_hba->tl_proto_id) { |
@@ -1009,7 +1018,7 @@ static int tcm_loop_make_nexus( | |||
1009 | /* | 1018 | /* |
1010 | * Initialize the struct se_session pointer | 1019 | * Initialize the struct se_session pointer |
1011 | */ | 1020 | */ |
1012 | tl_nexus->se_sess = transport_init_session(); | 1021 | tl_nexus->se_sess = transport_init_session(TARGET_PROT_ALL); |
1013 | if (IS_ERR(tl_nexus->se_sess)) { | 1022 | if (IS_ERR(tl_nexus->se_sess)) { |
1014 | ret = PTR_ERR(tl_nexus->se_sess); | 1023 | ret = PTR_ERR(tl_nexus->se_sess); |
1015 | goto out; | 1024 | goto out; |
@@ -1483,6 +1492,7 @@ static int tcm_loop_register_configfs(void) | |||
1483 | fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; | 1492 | fabric->tf_ops.queue_data_in = &tcm_loop_queue_data_in; |
1484 | fabric->tf_ops.queue_status = &tcm_loop_queue_status; | 1493 | fabric->tf_ops.queue_status = &tcm_loop_queue_status; |
1485 | fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; | 1494 | fabric->tf_ops.queue_tm_rsp = &tcm_loop_queue_tm_rsp; |
1495 | fabric->tf_ops.aborted_task = &tcm_loop_aborted_task; | ||
1486 | 1496 | ||
1487 | /* | 1497 | /* |
1488 | * Setup function pointers for generic logic in target_core_fabric_configfs.c | 1498 | * Setup function pointers for generic logic in target_core_fabric_configfs.c |