diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/ib/ibtl/ibtl_qp.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/sys/ib/ibtl/impl/ibtl_cm.h | 9 |
4 files changed, 37 insertions, 9 deletions
diff --git a/usr/src/uts/common/io/ib/ibtl/ibtl_qp.c b/usr/src/uts/common/io/ib/ibtl/ibtl_qp.c index 9d7119fbd8..49a03f8249 100644 --- a/usr/src/uts/common/io/ib/ibtl/ibtl_qp.c +++ b/usr/src/uts/common/io/ib/ibtl/ibtl_qp.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/ib/ibtl/impl/ibtl.h> @@ -477,6 +476,24 @@ ibtl_cm_chan_is_opening(ibt_channel_hdl_t chan) } /* + * ibtl_cm_chan_open_is_aborted() + * + * Inform IBTL that the connection established on this channel has + * aborted. So undo what was done in ibtl_cm_chan_is_opening(). + * + * chan Channel Handle + */ +void +ibtl_cm_chan_open_is_aborted(ibt_channel_hdl_t chan) +{ + IBTF_DPRINTF_L3(ibtf_qp, "ibtl_cm_chan_open_is_aborted(%p)", chan); + ASSERT(chan->ch_qp.qp_type == IBT_RC_SRV); + mutex_enter(&ibtl_free_qp_mutex); + chan->ch_transport.rc.rc_free_flags &= ~IBTL_RC_QP_CONNECTING; + mutex_exit(&ibtl_free_qp_mutex); +} + +/* * ibtl_cm_chan_is_open() * * Inform IBTL that the connection has been established on this diff --git a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c index ba4c56ad03..e3d403b3be 100644 --- a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c +++ b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/ib/mgt/ibcm/ibcm_impl.h> @@ -3389,6 +3388,8 @@ ibcm_process_abort(ibcm_state_data_t *statep) ibcm_insert_trace(statep, IBCM_TRACE_CALLED_CONN_CLOSE_EVENT); + ibtl_cm_chan_open_is_aborted(statep->channel); + (void) statep->cm_handler(statep->state_cm_private, &event, &ret_args, NULL, 0); @@ -5280,6 +5281,8 @@ ibcm_handler_conn_fail(ibcm_state_data_t *statep, uint8_t cf_code, ibcm_path_cache_purge(); + ibtl_cm_chan_open_is_aborted(statep->channel); + /* Invoke CM handler w/ event passed as arg */ if (statep->cm_handler != NULL) { bzero(&event, sizeof (ibt_cm_event_t)); @@ -7292,6 +7295,8 @@ ibcm_cep_state_rej(ibcm_state_data_t *statep, ibcm_rej_msg_t *rej_msgp, status); } + ibtl_cm_chan_open_is_aborted(statep->channel); + /* Disassociate state structure and CM */ IBCM_SET_CHAN_PRIVATE(statep->channel, NULL); diff --git a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c index 31a12310bc..28305afdda 100644 --- a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c +++ b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_ti.c @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <sys/ib/mgt/ibcm/ibcm_impl.h> @@ -891,8 +890,10 @@ ibt_open_rc_channel(ibt_channel_hdl_t channel, ibt_chan_open_flags_t flags, * In the case that open_channel() fails because of a * REJ or timeout, change retval to IBT_CM_FAILURE */ - if (statep->open_return_data->rc_status != IBT_CM_ACCEPT) + if (statep->open_return_data->rc_status != IBT_CM_ACCEPT) { status = IBT_CM_FAILURE; + ibtl_cm_chan_open_is_aborted(channel); + } IBTF_DPRINTF_L3(cmlog, "ibt_open_rc_channel: chan 0x%p " "ret status %d cm status %d", channel, status, diff --git a/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_cm.h b/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_cm.h index 7c14fe6350..ad0c334f40 100644 --- a/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_cm.h +++ b/usr/src/uts/common/sys/ib/ibtl/impl/ibtl_cm.h @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_IB_IBTL_IMPL_IBTL_CM_H @@ -120,6 +119,11 @@ uint16_t ibtl_cm_get_1st_full_pkey_ix(ib_guid_t hca_guid, uint8_t port); * Inform IBTL that the connection established on this channel is * in progress. * + * ibtl_cm_chan_open_is_aborted() + * + * Inform IBTL that the connection established on this channel has + * aborted. So undo what was done in ibtl_cm_chan_is_opening(). + * * ibtl_cm_chan_is_closing() * * Inform IBTL that the TIMEWAIT delay for the connection has been @@ -149,6 +153,7 @@ uint16_t ibtl_cm_get_1st_full_pkey_ix(ib_guid_t hca_guid, uint8_t port); */ void ibtl_cm_chan_is_open(ibt_channel_hdl_t rc_chan); void ibtl_cm_chan_is_opening(ibt_channel_hdl_t rc_chan); +void ibtl_cm_chan_open_is_aborted(ibt_channel_hdl_t rc_chan); void ibtl_cm_chan_is_closing(ibt_channel_hdl_t rc_chan); void ibtl_cm_chan_is_closed(ibt_channel_hdl_t rc_chan); void ibtl_cm_chan_is_reused(ibt_channel_hdl_t rc_chan); |