From 5c710a197bb60268e99e8d1cd7fa26f89b366172 Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Tue, 27 Apr 2010 11:20:08 -0700 Subject: [PATCH] scm: remove modify QP to ERR state during disconnect on UD type QP The disconnect on a UD type QP should not modify QP to error since this is a shared QP. The disconnect should be treated as a NOP on the UD type QP and only be transitioned during the QP destroy (dat_ep_free). Signed-off-by: Arlin Davis --- dapl/openib_scm/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c index afd0d93..7465190 100644 --- a/dapl/openib_scm/cm.c +++ b/dapl/openib_scm/cm.c @@ -458,13 +458,13 @@ DAT_RETURN dapli_socket_disconnect(dp_ib_cm_handle_t cm_ptr) dapl_os_unlock(&cm_ptr->lock); /* send disc date, close socket, schedule destroy */ - dapl_os_lock(&cm_ptr->ep->header.lock); - dapls_modify_qp_state(cm_ptr->ep->qp_handle, IBV_QPS_ERR, 0,0,0); - dapl_os_unlock(&cm_ptr->ep->header.lock); send(cm_ptr->socket, (char *)&disc_data, sizeof(disc_data), 0); /* disconnect events for RC's only */ if (cm_ptr->ep->param.ep_attr.service_type == DAT_SERVICE_TYPE_RC) { + dapl_os_lock(&cm_ptr->ep->header.lock); + dapls_modify_qp_state(cm_ptr->ep->qp_handle, IBV_QPS_ERR, 0,0,0); + dapl_os_unlock(&cm_ptr->ep->header.lock); if (cm_ptr->ep->cr_ptr) { dapls_cr_callback(cm_ptr, IB_CME_DISCONNECTED, -- 2.41.0