aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2011-10-24 02:23:57 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-30 06:04:01 -0400
commit32c30454507b4f5f00661ac12ddbcc150983b9ff (patch)
tree1cbe2ab0a1f5b630686bd5d6bf37d0a9bab3cb9b
parent99cc600cdd6f938633394523447378f7a43f4340 (diff)
[SCSI] bnx2fc: Handle SRR LS_ACC drop scenario
When SRR LS_ACC is dropped, the driver was not issuing ABTS for SRR when it times out. Since the target received SRR, it was able to send the XFER_RDY and the the original IO request completed successfully. In this condition ABTS was not sent during bnx2fc_srr_compl(). Fix this by first checking for ELS timeout and issue ABTS before checking if original IO request is complete. Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_els.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c
index fd382fe33f6e..ce0ce3e32f33 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_els.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_els.c
@@ -268,17 +268,6 @@ void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
268 268
269 orig_io_req = cb_arg->aborted_io_req; 269 orig_io_req = cb_arg->aborted_io_req;
270 srr_req = cb_arg->io_req; 270 srr_req = cb_arg->io_req;
271 if (test_bit(BNX2FC_FLAG_IO_COMPL, &orig_io_req->req_flags)) {
272 BNX2FC_IO_DBG(srr_req, "srr_compl: xid - 0x%x completed",
273 orig_io_req->xid);
274 goto srr_compl_done;
275 }
276 if (test_bit(BNX2FC_FLAG_ISSUE_ABTS, &orig_io_req->req_flags)) {
277 BNX2FC_IO_DBG(srr_req, "rec abts in prog "
278 "orig_io - 0x%x\n",
279 orig_io_req->xid);
280 goto srr_compl_done;
281 }
282 if (test_and_clear_bit(BNX2FC_FLAG_ELS_TIMEOUT, &srr_req->req_flags)) { 271 if (test_and_clear_bit(BNX2FC_FLAG_ELS_TIMEOUT, &srr_req->req_flags)) {
283 /* SRR timedout */ 272 /* SRR timedout */
284 BNX2FC_IO_DBG(srr_req, "srr timed out, abort " 273 BNX2FC_IO_DBG(srr_req, "srr timed out, abort "
@@ -290,6 +279,12 @@ void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
290 "failed. issue cleanup\n"); 279 "failed. issue cleanup\n");
291 bnx2fc_initiate_cleanup(srr_req); 280 bnx2fc_initiate_cleanup(srr_req);
292 } 281 }
282 if (test_bit(BNX2FC_FLAG_IO_COMPL, &orig_io_req->req_flags) ||
283 test_bit(BNX2FC_FLAG_ISSUE_ABTS, &orig_io_req->req_flags)) {
284 BNX2FC_IO_DBG(srr_req, "srr_compl:xid 0x%x flags = %lx",
285 orig_io_req->xid, orig_io_req->req_flags);
286 goto srr_compl_done;
287 }
293 orig_io_req->srr_retry++; 288 orig_io_req->srr_retry++;
294 if (orig_io_req->srr_retry <= SRR_RETRY_COUNT) { 289 if (orig_io_req->srr_retry <= SRR_RETRY_COUNT) {
295 struct bnx2fc_rport *tgt = orig_io_req->tgt; 290 struct bnx2fc_rport *tgt = orig_io_req->tgt;
@@ -311,6 +306,12 @@ void bnx2fc_srr_compl(struct bnx2fc_els_cb_arg *cb_arg)
311 } 306 }
312 goto srr_compl_done; 307 goto srr_compl_done;
313 } 308 }
309 if (test_bit(BNX2FC_FLAG_IO_COMPL, &orig_io_req->req_flags) ||
310 test_bit(BNX2FC_FLAG_ISSUE_ABTS, &orig_io_req->req_flags)) {
311 BNX2FC_IO_DBG(srr_req, "srr_compl:xid - 0x%x flags = %lx",
312 orig_io_req->xid, orig_io_req->req_flags);
313 goto srr_compl_done;
314 }
314 mp_req = &(srr_req->mp_req); 315 mp_req = &(srr_req->mp_req);
315 fc_hdr = &(mp_req->resp_fc_hdr); 316 fc_hdr = &(mp_req->resp_fc_hdr);
316 resp_len = mp_req->resp_len; 317 resp_len = mp_req->resp_len;