Bottom: 7784f453d39829ad87057d6488280ca48821ba8c
-Top: ca319bddfbb13954cab2a3e2352a3275d27cb03d
+Top: 7205d797ebb8c1b0cea4413bf8a01b6a1cdc04f2
Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
Date: 2009-12-07 10:36:50 -0800
} iba_cm_id_priv;\r
\r
diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c
-index 49fa417..4d0199d 100644
+index 49fa417..1c9671f 100644
--- a/trunk/core/al/kernel/al_cm_cep.c
+++ b/trunk/core/al/kernel/al_cm_cep.c
@@ -27,7 +27,7 @@
*/\r
\r
\r
-@@ -2227,91 +2227,72 @@ __cep_mad_send_cb(
+@@ -2213,105 +2213,79 @@ __cep_mad_send_cb(
+ \r
+ p_cep = (kcep_t*)p_mad->context1;\r
+ \r
+- /*\r
+- * The connection context is not set when performing immediate responses,\r
+- * such as repeating MADS.\r
+- */\r
+- if( !p_cep )\r
++ /* The cep context is only set for MADs that are retried. */\r
++ if( !p_cep )\r
+ {\r
+ ib_put_mad( p_mad );\r
+ AL_EXIT( AL_DBG_CM );\r
+ return;\r
+ }\r
+ \r
++ Cl_ASSERT( p_mad->status != IB_WCS_SUCCESS );\r
p_mad->context1 = NULL;\r
\r
KeAcquireInStackQueuedSpinLockAtDpcLevel( &gp_cep_mgr->lock, &hdl );\r
-+ if( p_cep->p_send_mad != p_mad || p_mad->status == IB_WCS_SUCCESS)\r
-+ {\r
-+ KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );\r
-+ ib_put_mad( p_mad );\r
-+ goto done;\r
-+ }\r
-+\r
- /* Clear the sent MAD pointer so that we don't try cancelling again. */\r
- if( p_cep->p_send_mad == p_mad )\r
- p_cep->p_send_mad = NULL;\r
- \r
+- /* Clear the sent MAD pointer so that we don't try cancelling again. */\r
+- if( p_cep->p_send_mad == p_mad )\r
+- p_cep->p_send_mad = NULL;\r
+-\r
- switch( p_mad->status )\r
-+ /* Treat as a timeout so we don't stall the state machine. */\r
-+ if( p_mad->status == IB_WCS_CANCELED)\r
-+ p_mad->status = IB_WCS_TIMEOUT_RETRY_ERR;\r
-+\r
-+ switch( p_cep->state )\r
++ if( p_cep->p_send_mad != p_mad )\r
{\r
- case IB_WCS_SUCCESS:\r
-- KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );\r
-- ib_put_mad( p_mad );\r
-+ case CEP_STATE_REQ_SENT:\r
-+ case CEP_STATE_REQ_MRA_RCVD:\r
-+ case CEP_STATE_REP_SENT:\r
-+ case CEP_STATE_REP_MRA_RCVD:\r
-+ /* Send the REJ. */\r
-+ __reject_timeout( p_port_cep, p_cep, p_mad );\r
-+ __remove_cep( p_cep );\r
-+ p_cep->state = CEP_STATE_IDLE;\r
- break;\r
- \r
+ KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );\r
+ ib_put_mad( p_mad );\r
+- break;\r
+-\r
- case IB_WCS_CANCELED:\r
- if( p_cep->state != CEP_STATE_REQ_SENT &&\r
- p_cep->state != CEP_STATE_REQ_MRA_RCVD &&\r
- /* Treat as a timeout so we don't stall the state machine. */\r
- p_mad->status = IB_WCS_TIMEOUT_RETRY_ERR;\r
-\r
-+ case CEP_STATE_DREQ_DESTROY:\r
-+ p_cep->state = CEP_STATE_DESTROY;\r
-+ __insert_timewait( p_cep );\r
- /* Fall through. */\r
+- /* Fall through. */\r
- case IB_WCS_TIMEOUT_RETRY_ERR:\r
- default:\r
- /* Timeout. Reject the connection. */\r
- p_cep->state = CEP_STATE_DESTROY;\r
- __insert_timewait( p_cep );\r
- /* Fall through. */\r
--\r
++ goto done;\r
++ }\r
+ \r
- case CEP_STATE_DESTROY:\r
- KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );\r
- ib_put_mad( p_mad );\r
- goto done;\r
--\r
++ /* Clear the sent MAD pointer so that we don't try cancelling again. */\r
++ p_cep->p_send_mad = NULL;\r
+ \r
- case CEP_STATE_DREQ_SENT:\r
- /*\r
- * Make up a DREP mad so we can respond if we receive\r
- p_cep->state = CEP_STATE_TIMEWAIT;\r
- __insert_timewait( p_cep );\r
- break;\r
--\r
++ switch( p_cep->state )\r
++ {\r
++ case CEP_STATE_REQ_SENT:\r
++ case CEP_STATE_REQ_MRA_RCVD:\r
++ case CEP_STATE_REP_SENT:\r
++ case CEP_STATE_REP_MRA_RCVD:\r
++ /* Send the REJ. */\r
++ __reject_timeout( p_port_cep, p_cep, p_mad );\r
++ __remove_cep( p_cep );\r
++ p_cep->state = CEP_STATE_IDLE;\r
++ break;\r
+ \r
- case CEP_STATE_LAP_SENT:\r
- /*\r
- * Before CEP was sent, we have been in CEP_STATE_ESTABLISHED as we\r
- default:\r
- break;\r
- }\r
++ case CEP_STATE_DREQ_DESTROY:\r
++ p_cep->state = CEP_STATE_DESTROY;\r
++ __insert_timewait( p_cep );\r
++ /* Fall through. */\r
\r
- status = __cep_queue_mad( p_cep, p_mad );\r
- CL_ASSERT( status != IB_INVALID_STATE );\r
done:\r
pfn_destroy_cb = p_cep->pfn_destroy_cb;\r
cep_context = p_cep->context;\r
-@@ -3938,12 +3919,8 @@ __cleanup_cep(
+@@ -3938,12 +3912,8 @@ __cleanup_cep(
CL_ASSERT( KeGetCurrentIrql() == DISPATCH_LEVEL );\r
\r
/* If we've already come through here, we're done. */\r
+++ /dev/null
-Bottom: ca319bddfbb13954cab2a3e2352a3275d27cb03d
-Top: 7205d797ebb8c1b0cea4413bf8a01b6a1cdc04f2
-Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
-Date: 2009-12-17 13:59:50 -0800
-
-Refresh of debug
-
----
-
-diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c
-index 4d0199d..1c9671f 100644
---- a/trunk/core/al/kernel/al_cm_cep.c
-+++ b/trunk/core/al/kernel/al_cm_cep.c
-@@ -2213,21 +2213,19 @@ __cep_mad_send_cb(
- \r
- p_cep = (kcep_t*)p_mad->context1;\r
- \r
-- /*\r
-- * The connection context is not set when performing immediate responses,\r
-- * such as repeating MADS.\r
-- */\r
-- if( !p_cep )\r
-+ /* The cep context is only set for MADs that are retried. */\r
-+ if( !p_cep )\r
- {\r
- ib_put_mad( p_mad );\r
- AL_EXIT( AL_DBG_CM );\r
- return;\r
- }\r
- \r
-+ Cl_ASSERT( p_mad->status != IB_WCS_SUCCESS );\r
- p_mad->context1 = NULL;\r
- \r
- KeAcquireInStackQueuedSpinLockAtDpcLevel( &gp_cep_mgr->lock, &hdl );\r
-- if( p_cep->p_send_mad != p_mad || p_mad->status == IB_WCS_SUCCESS)\r
-+ if( p_cep->p_send_mad != p_mad )\r
- {\r
- KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );\r
- ib_put_mad( p_mad );\r
-@@ -2235,12 +2233,7 @@ __cep_mad_send_cb(
- }\r
- \r
- /* Clear the sent MAD pointer so that we don't try cancelling again. */\r
-- if( p_cep->p_send_mad == p_mad )\r
-- p_cep->p_send_mad = NULL;\r
--\r
-- /* Treat as a timeout so we don't stall the state machine. */\r
-- if( p_mad->status == IB_WCS_CANCELED)\r
-- p_mad->status = IB_WCS_TIMEOUT_RETRY_ERR;\r
-+ p_cep->p_send_mad = NULL;\r
- \r
- switch( p_cep->state )\r
- {