diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-05-17 09:13:21 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-05-17 09:13:21 -0700 |
commit | e65810566f3e613d9baa5512b8724ebde42ace0f (patch) | |
tree | 4d2cb2737f240eff4a54d73fd4f33ced16954526 /drivers | |
parent | 1db76c14d215c8b26024dd532de3dcaf66ea30f7 (diff) | |
download | linux-e65810566f3e613d9baa5512b8724ebde42ace0f.tar.gz linux-e65810566f3e613d9baa5512b8724ebde42ace0f.tar.bz2 linux-e65810566f3e613d9baa5512b8724ebde42ace0f.zip |
IB/srp: Don't wait for disconnection if sending DREQ fails
Sending a DREQ may fail, for example because the remote target has
already broken the connection. If so, then SRP should not wait for
the disconnection to complete, because it never will.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index c32ce4348e1b..351d66f3250d 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -340,7 +340,10 @@ static void srp_disconnect_target(struct srp_target_port *target) /* XXX should send SRP_I_LOGOUT request */ init_completion(&target->done); - ib_send_cm_dreq(target->cm_id, NULL, 0); + if (ib_send_cm_dreq(target->cm_id, NULL, 0)) { + printk(KERN_DEBUG PFX "Sending CM DREQ failed\n"); + return; + } wait_for_completion(&target->done); } |