Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55d93898 authored by Vu Pham's avatar Vu Pham Committed by Roland Dreier
Browse files

IB/srp: send disconnect request without waiting for CM timewait exit



Now that SRP recreates the CM ID, QP, and CQ for each connection,
there is no need to wait for the timewait state to complete.

Signed-off-by: default avatarVu Pham <vu@mellanox.com>
Signed-off-by: default avatarDavid Dillow <dillowda@ornl.gov>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 73aa89ed
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -481,12 +481,9 @@ static void srp_disconnect_target(struct srp_target_port *target)
	if (srp_change_conn_state(target, false)) {
		/* XXX should send SRP_I_LOGOUT request */

		init_completion(&target->done);
		if (ib_send_cm_dreq(target->cm_id, NULL, 0)) {
			shost_printk(KERN_DEBUG, target->scsi_host,
				     PFX "Sending CM DREQ failed\n");
		} else {
			wait_for_completion(&target->done);
		}
	}
}
@@ -1664,7 +1661,6 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
		shost_printk(KERN_ERR, target->scsi_host,
			     PFX "connection closed\n");

		comp = 1;
		target->status = 0;
		break;