If reconnecting failed we know that no command completion will be received anymore. Hence let the SCSI error handler fail such commands immediately.
Signed-off-by: Bart Van Assche <bvanass...@acm.org> Cc: Roland Dreier <rol...@purestorage.com> Cc: David Dillow <dillo...@ornl.gov> Cc: Sebastian Riemer <sebastian.rie...@profitbricks.com> Cc: Vu Pham <v...@mellanox.com> --- drivers/infiniband/ulp/srp/ib_srp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 8c95262..5c91521 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1755,6 +1755,8 @@ static int srp_abort(struct scsi_cmnd *scmnd) if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, SRP_TSK_ABORT_TASK) == 0) ret = SUCCESS; + else if (target->transport_offline) + ret = FAST_IO_FAIL; else ret = FAILED; srp_free_req(target, req, scmnd, 0); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html