diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-12 19:41:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-12 19:41:23 -0400 |
commit | 011e3c63251be832d23df9f0697626ab7b354d02 (patch) | |
tree | 2cad5b58c274c93ae49d9b58fb15d784d4dfd78f /drivers/target/tcm_fc/tfc_cmd.c | |
parent | c1412fce7eccae62b4de22494f6ab3ff8a90c0c6 (diff) | |
parent | ecca5c3acc0d0933d89abc44e60afb0cc8170e35 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/target/tcm_fc/tfc_cmd.c')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index 62dec9715ce..a375f257aab 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -121,6 +121,8 @@ int ft_queue_status(struct se_cmd *se_cmd) | |||
121 | struct fc_exch *ep; | 121 | struct fc_exch *ep; |
122 | size_t len; | 122 | size_t len; |
123 | 123 | ||
124 | if (cmd->aborted) | ||
125 | return 0; | ||
124 | ft_dump_cmd(cmd, __func__); | 126 | ft_dump_cmd(cmd, __func__); |
125 | ep = fc_seq_exch(cmd->seq); | 127 | ep = fc_seq_exch(cmd->seq); |
126 | lport = ep->lp; | 128 | lport = ep->lp; |
@@ -187,6 +189,8 @@ int ft_write_pending(struct se_cmd *se_cmd) | |||
187 | 189 | ||
188 | ft_dump_cmd(cmd, __func__); | 190 | ft_dump_cmd(cmd, __func__); |
189 | 191 | ||
192 | if (cmd->aborted) | ||
193 | return 0; | ||
190 | ep = fc_seq_exch(cmd->seq); | 194 | ep = fc_seq_exch(cmd->seq); |
191 | lport = ep->lp; | 195 | lport = ep->lp; |
192 | fp = fc_frame_alloc(lport, sizeof(*txrdy)); | 196 | fp = fc_frame_alloc(lport, sizeof(*txrdy)); |
@@ -252,10 +256,10 @@ static void ft_recv_seq(struct fc_seq *sp, struct fc_frame *fp, void *arg) | |||
252 | struct ft_cmd *cmd = arg; | 256 | struct ft_cmd *cmd = arg; |
253 | struct fc_frame_header *fh; | 257 | struct fc_frame_header *fh; |
254 | 258 | ||
255 | if (IS_ERR(fp)) { | 259 | if (unlikely(IS_ERR(fp))) { |
256 | /* XXX need to find cmd if queued */ | 260 | /* XXX need to find cmd if queued */ |
257 | cmd->seq = NULL; | 261 | cmd->seq = NULL; |
258 | transport_generic_free_cmd(&cmd->se_cmd, 0); | 262 | cmd->aborted = true; |
259 | return; | 263 | return; |
260 | } | 264 | } |
261 | 265 | ||
@@ -399,6 +403,8 @@ int ft_queue_tm_resp(struct se_cmd *se_cmd) | |||
399 | struct se_tmr_req *tmr = se_cmd->se_tmr_req; | 403 | struct se_tmr_req *tmr = se_cmd->se_tmr_req; |
400 | enum fcp_resp_rsp_codes code; | 404 | enum fcp_resp_rsp_codes code; |
401 | 405 | ||
406 | if (cmd->aborted) | ||
407 | return 0; | ||
402 | switch (tmr->response) { | 408 | switch (tmr->response) { |
403 | case TMR_FUNCTION_COMPLETE: | 409 | case TMR_FUNCTION_COMPLETE: |
404 | code = FCP_TMF_CMPL; | 410 | code = FCP_TMF_CMPL; |