tcm_fc: Call lookup_tmr_lun() for all TM types
Don't see a reason to differentiate, so drop the fabric specific switch statement in ft_send_tm() ahead of conversion to use target_submit_tmr(). Signed-off-by: Andy Grover <agrover@redhat.com> Cc: Kiran Patil <kiran.patil@intel.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
5ebddd48ff
commit
06fb6313d9
|
@ -399,33 +399,19 @@ static void ft_send_tm(struct ft_cmd *cmd)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fcp->fc_tm_flags) {
|
rc = transport_lookup_tmr_lun(&cmd->se_cmd, scsilun_to_int(&fcp->fc_lun));
|
||||||
case FCP_TMF_LUN_RESET:
|
if (rc < 0) {
|
||||||
if (transport_lookup_tmr_lun(&cmd->se_cmd, scsilun_to_int(&fcp->fc_lun)) < 0) {
|
pr_debug("Failed to get LUN for TMR func %d, "
|
||||||
/*
|
"se_cmd %p, unpacked_lun %d\n",
|
||||||
* Make sure to clean up newly allocated TMR request
|
tm_func, &cmd->se_cmd, scsilun_to_int(&fcp->fc_lun));
|
||||||
* since "unable to handle TMR request because failed
|
ft_dump_cmd(cmd, __func__);
|
||||||
* to get to LUN"
|
sess = cmd->sess;
|
||||||
*/
|
transport_send_check_condition_and_sense(&cmd->se_cmd,
|
||||||
pr_debug("Failed to get LUN for TMR func %d, "
|
cmd->se_cmd.scsi_sense_reason, 0);
|
||||||
"se_cmd %p, unpacked_lun %d\n",
|
ft_sess_put(sess);
|
||||||
tm_func, &cmd->se_cmd, scsilun_to_int(&fcp->fc_lun));
|
|
||||||
ft_dump_cmd(cmd, __func__);
|
|
||||||
sess = cmd->sess;
|
|
||||||
transport_send_check_condition_and_sense(&cmd->se_cmd,
|
|
||||||
cmd->se_cmd.scsi_sense_reason, 0);
|
|
||||||
ft_sess_put(sess);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case FCP_TMF_TGT_RESET:
|
|
||||||
case FCP_TMF_CLR_TASK_SET:
|
|
||||||
case FCP_TMF_ABT_TASK_SET:
|
|
||||||
case FCP_TMF_CLR_ACA:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
transport_generic_handle_tmr(&cmd->se_cmd);
|
transport_generic_handle_tmr(&cmd->se_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue