This is a note to let you know that I've just added the patch titled IB/srp: Avoid offlining operational SCSI devices to the 3.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ib-srp-avoid-offlining-operational-scsi-devices.patch and it can be found in the queue-3.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 99b6697a50c2acbe3ca2772d359fc9a28835dc84 Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bvanassche@xxxxxxx> Date: Thu, 10 Oct 2013 13:52:33 +0200 Subject: IB/srp: Avoid offlining operational SCSI devices From: Bart Van Assche <bvanassche@xxxxxxx> commit 99b6697a50c2acbe3ca2772d359fc9a28835dc84 upstream. 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@xxxxxxx> Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1752,7 +1752,7 @@ static int srp_abort(struct scsi_cmnd *s shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n"); if (!req || !srp_claim_req(target, req, scmnd)) - return FAILED; + return SUCCESS; if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun, SRP_TSK_ABORT_TASK) == 0) ret = SUCCESS; Patches currently in stable-queue which might be from bvanassche@xxxxxxx are queue-3.12/ib-srp-remove-target-from-list-before-freeing-scsi_host-structure.patch queue-3.12/ib-srp-avoid-offlining-operational-scsi-devices.patch queue-3.12/ib-srp-report-receive-errors-correctly.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html