Commit 06fb6313 authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger
Browse files

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: default avatarAndy Grover <agrover@redhat.com>
Cc: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 5ebddd48
Loading
Loading
Loading
Loading
+11 −25
Original line number Diff line number Diff line
@@ -399,14 +399,8 @@ static void ft_send_tm(struct ft_cmd *cmd)
		return;
	}

	switch (fcp->fc_tm_flags) {
	case FCP_TMF_LUN_RESET:
		if (transport_lookup_tmr_lun(&cmd->se_cmd, scsilun_to_int(&fcp->fc_lun)) < 0) {
			/*
			 * Make sure to clean up newly allocated TMR request
			 * since "unable to  handle TMR request because failed
			 * to get to LUN"
			 */
	rc = transport_lookup_tmr_lun(&cmd->se_cmd, scsilun_to_int(&fcp->fc_lun));
	if (rc < 0) {
		pr_debug("Failed to get LUN for TMR func %d, "
			  "se_cmd %p, unpacked_lun %d\n",
			  tm_func, &cmd->se_cmd, scsilun_to_int(&fcp->fc_lun));
@@ -417,15 +411,7 @@ static void ft_send_tm(struct ft_cmd *cmd)
		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;
	}

	transport_generic_handle_tmr(&cmd->se_cmd);
}