aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r--drivers/target/tcm_fc/tfc_io.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
index b6fd4cf42840..e415af32115a 100644
--- a/drivers/target/tcm_fc/tfc_io.c
+++ b/drivers/target/tcm_fc/tfc_io.c
@@ -103,6 +103,13 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
103 use_sg = !(remaining % 4); 103 use_sg = !(remaining % 4);
104 104
105 while (remaining) { 105 while (remaining) {
106 struct fc_seq *seq = cmd->seq;
107
108 if (!seq) {
109 pr_debug("%s: Command aborted, xid 0x%x\n",
110 __func__, ep->xid);
111 break;
112 }
106 if (!mem_len) { 113 if (!mem_len) {
107 sg = sg_next(sg); 114 sg = sg_next(sg);
108 mem_len = min((size_t)sg->length, remaining); 115 mem_len = min((size_t)sg->length, remaining);
@@ -169,7 +176,7 @@ int ft_queue_data_in(struct se_cmd *se_cmd)
169 f_ctl |= FC_FC_END_SEQ; 176 f_ctl |= FC_FC_END_SEQ;
170 fc_fill_fc_hdr(fp, FC_RCTL_DD_SOL_DATA, ep->did, ep->sid, 177 fc_fill_fc_hdr(fp, FC_RCTL_DD_SOL_DATA, ep->did, ep->sid,
171 FC_TYPE_FCP, f_ctl, fh_off); 178 FC_TYPE_FCP, f_ctl, fh_off);
172 error = lport->tt.seq_send(lport, cmd->seq, fp); 179 error = lport->tt.seq_send(lport, seq, fp);
173 if (error) { 180 if (error) {
174 /* XXX For now, initiator will retry */ 181 /* XXX For now, initiator will retry */
175 pr_err_ratelimited("%s: Failed to send frame %p, " 182 pr_err_ratelimited("%s: Failed to send frame %p, "