--- /dev/null
+Bottom: d977ff3e5275dc5b3d631ee9f9075b0601e5ef82
+Top: 9f668e164ecedfe5fcc8fa297eb50d5f24ba462a
+Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
+Date: 2009-12-16 15:49:23 -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 2120ee4..7b98187 100644
+--- a/trunk/core/al/kernel/al_cm_cep.c
++++ b/trunk/core/al/kernel/al_cm_cep.c
+@@ -318,6 +318,7 @@ typedef struct _al_kcep
+ \r
+ /* Volatile to allow using atomic operations for state checks. */\r
+ cep_state_t state;\r
++cep_state_t old_state[1];\r
+ \r
+ /*\r
+ * Flag that indicates whether a connection took the active role during\r
+@@ -1737,6 +1738,7 @@ __drep_handler(
+ {\r
+ /* State is DREQ_DESTROY - move to DESTROY to allow cleanup. */\r
+ CL_ASSERT( p_cep->state == CEP_STATE_DREQ_DESTROY );\r
++p_cep->old_state[0] = p_cep->state;\r
+ p_cep->state = CEP_STATE_DESTROY;\r
+ \r
+ ib_put_mad( p_mad );\r
+@@ -2198,7 +2200,7 @@ __cep_mad_send_cb(
+ IN ib_mad_element_t *p_mad )\r
+ {\r
+ ib_wc_status_t mad_status;\r
+-cep_state_t cep_state;\r
++cep_state_t state;\r
+ ib_net16_t attr_id;\r
+ ib_api_status_t status;\r
+ cep_agent_t *p_port_cep;\r
+@@ -2237,7 +2239,7 @@ ib_net16_t attr_id;
+ \r
+ attr_id = p_mad->p_mad_buf->attr_id;\r
+ mad_status = p_mad->status;\r
+-cep_state = p_cep->state;\r
++state = p_cep->state;\r
+ switch( p_mad->status )\r
+ {\r
+ case IB_WCS_SUCCESS:\r
+@@ -2279,6 +2281,7 @@ cep_state = p_cep->state;
+ break;\r
+ \r
+ case CEP_STATE_DREQ_DESTROY:\r
++p_cep->old_state[0] = p_cep->state;\r
+ p_cep->state = CEP_STATE_DESTROY;\r
+ __insert_timewait( p_cep );\r
+ /* Fall through. */\r
+@@ -2326,8 +2329,8 @@ done:
+ if( !cl_atomic_dec( &p_cep->ref_cnt ) && pfn_destroy_cb )\r
+ {\r
+ if (mad_status != IB_WCS_CANCELED)\r
+- DbgPrintEx(DPFLTR_IHVDRIVER_ID, 0, "__cep_mad_send_cb destroying cid 0x%x, attr 0x%x mad status 0x%x cep state 0x%x\n",\r
+- p_cep->cid, attr_id, mad_status, cep_state);\r
++ DbgPrintEx(DPFLTR_IHVDRIVER_ID, 0, "__cep_mad_send_cb destroying cid 0x%x, attr 0x%x mad status 0x%x cep state 0x%x old_state 0x%x\n",\r
++ p_cep->cid, attr_id, mad_status, cep_state, p_cep->old_state[0]);\r
+ \r
+ pfn_destroy_cb( cep_context );\r
+ }\r
+@@ -4055,10 +4058,12 @@ DbgPrintEx(DPFLTR_IHVDRIVER_ID, 0, "IB CM is D-U-M-B\n");
+ AL_PRINT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("CEP in state %d.\n", p_cep->state) );\r
+ case CEP_STATE_TIMEWAIT:\r
+ /* Already in timewait - so all is good. */\r
++p_cep->old_state[0] = p_cep->state;\r
+ p_cep->state = CEP_STATE_DESTROY;\r
+ goto out;\r
+ }\r
+ \r
++p_cep->old_state[0] = p_cep->state;\r
+ p_cep->state = CEP_STATE_DESTROY;\r
+ __insert_timewait( p_cep );