projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1b2f13
)
IB/srp: Avoid sending a task management function needlessly
author
Bart Van Assche
<
[email protected]
>
Thu, 21 Feb 2013 17:18:00 +0000
(17:18 +0000)
committer
Roland Dreier
<
[email protected]
>
Mon, 25 Feb 2013 17:31:14 +0000
(09:31 -0800)
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 <
[email protected]
>
Acked-by: David Dillow <
[email protected]
>
Cc: <
[email protected]
> # 3.8
Signed-off-by: Roland Dreier <
[email protected]
>
drivers/infiniband/ulp/srp/ib_srp.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/srp/ib_srp.c
b/drivers/infiniband/ulp/srp/ib_srp.c
index 94f76b9319c191220b5731bf3b2f93c9dfdfe4cd..263325848462f5beee8d81f1a794a6a853d7a45d 100644
(file)
--- 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_target_port *target,
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_cmnd *scmnd)
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;