aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2013-10-10 07:52:33 -0400
committerRoland Dreier <roland@purestorage.com>2013-11-08 17:43:18 -0500
commit99b6697a50c2acbe3ca2772d359fc9a28835dc84 (patch)
tree2c3721c4c7b8f5722e28ec31ef95076f7b0c5381 /drivers/infiniband
parent65d7dd2f3479ef5aec1d9ddd1481cb7851c11af6 (diff)
IB/srp: Avoid offlining operational SCSI devices
If SCSI commands are submitted with a SCSI request timeout that is lower than the the IB RC timeout, it can happen that the SCSI error handler has already started device recovery before transport layer error handling starts. So it can happen that the SCSI error handler tries to abort a SCSI command after it has been reset by srp_rport_reconnect(). Tell the SCSI error handler that such commands have finished and that it is not necessary to continue its recovery strategy for commands that have been reset by srp_rport_reconnect(). Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: <stable@vger.kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index a8c06c4451c0..4bf2f9feb59a 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2000,7 +2000,7 @@ static int srp_abort(struct scsi_cmnd *scmnd)
2000 shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n"); 2000 shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
2001 2001
2002 if (!req || !srp_claim_req(target, req, scmnd)) 2002 if (!req || !srp_claim_req(target, req, scmnd))
2003 return FAILED; 2003 return SUCCESS;
2004 if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, 2004 if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun,
2005 SRP_TSK_ABORT_TASK) == 0) 2005 SRP_TSK_ABORT_TASK) == 0)
2006 ret = SUCCESS; 2006 ret = SUCCESS;