This is a note to let you know that I've just added the patch titled IB/srp: Avoid sending a task management function needlessly to the 3.8-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-sending-a-task-management-function-needlessly.patch and it can be found in the queue-3.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3780d1f08856f692116bcf026e4acf1c521df1c7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche <bvanassche@xxxxxxx> Date: Thu, 21 Feb 2013 17:18:00 +0000 Subject: IB/srp: Avoid sending a task management function needlessly From: Bart Van Assche <bvanassche@xxxxxxx> commit 3780d1f08856f692116bcf026e4acf1c521df1c7 upstream. Do not send a task management function if sending will fail anyway because either there is no RDMA/RC connection or the QP is in the error state. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> Acked-by: David Dillow <dave@xxxxxxxxxxxxxx> Signed-off-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1695,6 +1695,9 @@ static int srp_send_tsk_mgmt(struct srp_ struct srp_iu *iu; struct srp_tsk_mgmt *tsk_mgmt; + if (!target->connected || target->qp_in_error) + return -1; + init_completion(&target->tsk_mgmt_done); spin_lock_irq(&target->lock); @@ -1754,8 +1757,6 @@ static int srp_reset_device(struct scsi_ shost_printk(KERN_ERR, target->scsi_host, "SRP reset_device called\n"); - if (target->qp_in_error) - return FAILED; if (srp_send_tsk_mgmt(target, SRP_TAG_NO_REQ, scmnd->device->lun, SRP_TSK_LUN_RESET)) return FAILED; Patches currently in stable-queue which might be from bvanassche@xxxxxxx are queue-3.8/ib-srp-avoid-sending-a-task-management-function-needlessly.patch queue-3.8/ib-srp-avoid-endless-scsi-error-handling-loop.patch queue-3.8/ib-srp-fail-i-o-requests-if-the-transport-is-offline.patch queue-3.8/ib-srp-track-connection-state-properly.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