A quote from SAM-5: "The service response of FUNCTION COMPLETE does not distinguish between whether a command was aborted or no matching command was in the task set." Hence always return FUNCTION COMPLETE. Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> --- drivers/target/target_core_tmr.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index d0a4102..288d551 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -156,17 +156,14 @@ void core_tmr_abort_task( target_put_sess_cmd(se_cmd); transport_cmd_finish_abort(se_cmd, true); - printk("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for" - " ref_tag: %llu\n", ref_tag); - tmr->response = TMR_FUNCTION_COMPLETE; - return; + goto out; } spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags); out: - printk("ABORT_TASK: Sending TMR_TASK_DOES_NOT_EXIST for ref_tag: %lld\n", - tmr->ref_task_tag); - tmr->response = TMR_TASK_DOES_NOT_EXIST; + pr_info("ABORT_TASK: Sending TMR_FUNCTION_COMPLETE for ref_tag %llu\n", + tmr->ref_task_tag); + tmr->response = TMR_FUNCTION_COMPLETE; } static void core_tmr_drain_tmr_list( -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html