Skip to content

Commit

Permalink
IB/srp: Don't wait for disconnection if sending DREQ fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier committed May 17, 2006
1 parent 1db76c1 commit e658105
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e658105

Please sign in to comment.