Version: 1
-Previous: dd9565d93ac96e93fa3523e038f08dc759775e80
-Head: cf9834573e5232967cff16c9f0cab8570d317162
+Previous: dd754c3bf06a2b610864738b89f0dc7eeabeeedb
+Head: cf3d8f575a7f2febaead9e8cbacbeb30f0ede7f5
Applied:
rm-build: d6d2302f2d258fa2c07e55a2e124a9bdd75367a0
cm_listen_handler: 56372fe5e423b7238a4db99258c1493748c0a582
- cm_poll: 886dd7122480caf77990269f79b2a3a2c59d9c51
- refresh-temp: cf9834573e5232967cff16c9f0cab8570d317162
+ cm_poll: cf3d8f575a7f2febaead9e8cbacbeb30f0ede7f5
Unapplied:
old-bld-32: bd1bd1d366e3927b7646da33e243213a5d59c235
old-apphang: 7a6f7ff02c6035e54fc262414eb9484ea98018b9
Bottom: fa748f1c52b43305bedd9af43719f0863bbecab5
-Top: fa748f1c52b43305bedd9af43719f0863bbecab5
+Top: b937ed604e0f514a53056550ac39de031e204f3d
Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
Date: 2010-01-06 10:08:50 -0800
---
-
+diff --git a/trunk/core/al/kernel/al_cm.c b/trunk/core/al/kernel/al_cm.c
+index 177bb9e..10860c4 100644
+--- a/trunk/core/al/kernel/al_cm.c
++++ b/trunk/core/al/kernel/al_cm.c
+@@ -99,36 +99,45 @@ cm_cep_handler(const ib_al_handle_t h_al, const net32_t cid)
+ static void\r
+ cm_listen_handler(const ib_al_handle_t h_al, const net32_t cid)\r
+ {\r
++ iba_cm_id *id;\r
++ iba_cm_event event;\r
++\r
++ id = (iba_cm_id *) kal_cep_get_context(h_al, cid, cm_listen_handler, NULL);\r
++ memset(&event, 0, sizeof event);\r
++ event.type = iba_cm_req_received;\r
++ id->callback(id, &event);\r
++}\r
++\r
++static NTSTATUS\r
++cm_get_reqeust(iba_cm_id *p_id, iba_cm_event *p_event)\r
++{\r
+ void *context;\r
+ net32_t new_cid;\r
+ ib_mad_element_t *mad;\r
+ iba_cm_id *id, *listen_id;\r
+ iba_cm_event event;\r
+- NTSTATUS status;\r
++ ib_api_status_t ib_status;\r
+ \r
+- while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
+-\r
+- listen_id = (iba_cm_id *) context;\r
+-\r
+- id = cm_alloc_id(listen_id->callback, listen_id);\r
+- if (id == NULL) {\r
+- kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
+- ib_put_mad(mad);\r
+- continue;\r
+- }\r
++ status = al_cep_poll(gh_al, p_id->cid, &context, &new_cid, &mad);\r
++ if (ib_status != IB_SUCCESS) {\r
++ return ib_to_ntstatus(ib_status);\r
++ }\r
+ \r
+- kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
+- id->cid = new_cid;\r
++ listen_id = (iba_cm_id *) context;\r
+ \r
+- kal_cep_format_event(h_al, id->cid, mad, &event);\r
+- status = id->callback(id, &event);\r
+- if (!NT_SUCCESS(status)) {\r
+- kal_cep_config(h_al, new_cid, NULL, NULL, NULL);\r
+- kal_cep_destroy(h_al, id->cid, status);\r
+- cm_free_id(id);\r
+- }\r
++ id = cm_alloc_id(listen_id->callback, listen_id);\r
++ if (id == NULL) {\r
++ kal_cep_destroy(gh_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
+ ib_put_mad(mad);\r
++ return STATUS_NO_MEMORY;\r
+ }\r
++\r
++ kal_cep_config(gh_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
++ id->cid = new_cid;\r
++\r
++ kal_cep_format_event(gh_al, id->cid, mad, &event);\r
++ ib_put_mad(mad);\r
++ return STATUS_SUCCESS;\r
+ }\r
+ \r
+ static NTSTATUS\r
+diff --git a/trunk/inc/kernel/iba/ib_cm_ifc.h b/trunk/inc/kernel/iba/ib_cm_ifc.h
+index 0949482..07626e5 100644
+--- a/trunk/inc/kernel/iba/ib_cm_ifc.h
++++ b/trunk/inc/kernel/iba/ib_cm_ifc.h
+@@ -239,6 +239,7 @@ typedef struct _iba_cm_interface
+ \r
+ NTSTATUS (*listen)(iba_cm_id *p_id, net64_t service_id, void *p_compare_buf,\r
+ uint8_t compare_len, uint8_t compare_offset);\r
++ NTSTATUS (*get_reqeust)(iba_cm_id *p_id, iba_cm_event *p_event);\r
+ \r
+ NTSTATUS (*send_req)(iba_cm_id *p_id, iba_cm_req *p_req);\r
+ NTSTATUS (*send_rep)(iba_cm_id *p_id, iba_cm_rep *p_rep);\r
+@@ -282,9 +283,9 @@ static inline UINT8 IbaCmVersionMinor(USHORT Version)
+ return (UINT8) Version;\r
+ }\r
+ \r
+-// {EACC1466-BB2D-4478-B5BE-40EDF7EE08AB}\r
+-DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0xeacc1466, 0xbb2d, 0x4478,\r
+- 0xb5, 0xbe, 0x40, 0xed, 0xf7, 0xee, 0x8, 0xab);\r
++// {6A11D060-8957-49e6-BE2A-01EDF1BD22B3}\r
++DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0x6a11d060, 0x8957, 0x49e6,\r
++ 0xbe, 0x2a, 0x1, 0xed, 0xf1, 0xbd, 0x22, 0xb3);\r
+ \r
+ typedef struct _INFINIBAND_INTERFACE_CM\r
+ {
+++ /dev/null
-Bottom: fa748f1c52b43305bedd9af43719f0863bbecab5
-Top: b937ed604e0f514a53056550ac39de031e204f3d
-Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
-Date: 2010-01-06 11:21:50 -0800
-
-Refresh of cm_poll
-
----
-
-diff --git a/trunk/core/al/kernel/al_cm.c b/trunk/core/al/kernel/al_cm.c
-index 177bb9e..10860c4 100644
---- a/trunk/core/al/kernel/al_cm.c
-+++ b/trunk/core/al/kernel/al_cm.c
-@@ -99,36 +99,45 @@ cm_cep_handler(const ib_al_handle_t h_al, const net32_t cid)
- static void\r
- cm_listen_handler(const ib_al_handle_t h_al, const net32_t cid)\r
- {\r
-+ iba_cm_id *id;\r
-+ iba_cm_event event;\r
-+\r
-+ id = (iba_cm_id *) kal_cep_get_context(h_al, cid, cm_listen_handler, NULL);\r
-+ memset(&event, 0, sizeof event);\r
-+ event.type = iba_cm_req_received;\r
-+ id->callback(id, &event);\r
-+}\r
-+\r
-+static NTSTATUS\r
-+cm_get_reqeust(iba_cm_id *p_id, iba_cm_event *p_event)\r
-+{\r
- void *context;\r
- net32_t new_cid;\r
- ib_mad_element_t *mad;\r
- iba_cm_id *id, *listen_id;\r
- iba_cm_event event;\r
-- NTSTATUS status;\r
-+ ib_api_status_t ib_status;\r
- \r
-- while (al_cep_poll(h_al, cid, &context, &new_cid, &mad) == IB_SUCCESS) {\r
--\r
-- listen_id = (iba_cm_id *) context;\r
--\r
-- id = cm_alloc_id(listen_id->callback, listen_id);\r
-- if (id == NULL) {\r
-- kal_cep_destroy(h_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
-- ib_put_mad(mad);\r
-- continue;\r
-- }\r
-+ status = al_cep_poll(gh_al, p_id->cid, &context, &new_cid, &mad);\r
-+ if (ib_status != IB_SUCCESS) {\r
-+ return ib_to_ntstatus(ib_status);\r
-+ }\r
- \r
-- kal_cep_config(h_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
-- id->cid = new_cid;\r
-+ listen_id = (iba_cm_id *) context;\r
- \r
-- kal_cep_format_event(h_al, id->cid, mad, &event);\r
-- status = id->callback(id, &event);\r
-- if (!NT_SUCCESS(status)) {\r
-- kal_cep_config(h_al, new_cid, NULL, NULL, NULL);\r
-- kal_cep_destroy(h_al, id->cid, status);\r
-- cm_free_id(id);\r
-- }\r
-+ id = cm_alloc_id(listen_id->callback, listen_id);\r
-+ if (id == NULL) {\r
-+ kal_cep_destroy(gh_al, new_cid, STATUS_NO_MORE_ENTRIES);\r
- ib_put_mad(mad);\r
-+ return STATUS_NO_MEMORY;\r
- }\r
-+\r
-+ kal_cep_config(gh_al, new_cid, cm_cep_handler, id, cm_destroy_handler);\r
-+ id->cid = new_cid;\r
-+\r
-+ kal_cep_format_event(gh_al, id->cid, mad, &event);\r
-+ ib_put_mad(mad);\r
-+ return STATUS_SUCCESS;\r
- }\r
- \r
- static NTSTATUS\r
-diff --git a/trunk/inc/kernel/iba/ib_cm_ifc.h b/trunk/inc/kernel/iba/ib_cm_ifc.h
-index 0949482..07626e5 100644
---- a/trunk/inc/kernel/iba/ib_cm_ifc.h
-+++ b/trunk/inc/kernel/iba/ib_cm_ifc.h
-@@ -239,6 +239,7 @@ typedef struct _iba_cm_interface
- \r
- NTSTATUS (*listen)(iba_cm_id *p_id, net64_t service_id, void *p_compare_buf,\r
- uint8_t compare_len, uint8_t compare_offset);\r
-+ NTSTATUS (*get_reqeust)(iba_cm_id *p_id, iba_cm_event *p_event);\r
- \r
- NTSTATUS (*send_req)(iba_cm_id *p_id, iba_cm_req *p_req);\r
- NTSTATUS (*send_rep)(iba_cm_id *p_id, iba_cm_rep *p_rep);\r
-@@ -282,9 +283,9 @@ static inline UINT8 IbaCmVersionMinor(USHORT Version)
- return (UINT8) Version;\r
- }\r
- \r
--// {EACC1466-BB2D-4478-B5BE-40EDF7EE08AB}\r
--DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0xeacc1466, 0xbb2d, 0x4478,\r
-- 0xb5, 0xbe, 0x40, 0xed, 0xf7, 0xee, 0x8, 0xab);\r
-+// {6A11D060-8957-49e6-BE2A-01EDF1BD22B3}\r
-+DEFINE_GUID(GUID_INFINIBAND_INTERFACE_CM, 0x6a11d060, 0x8957, 0x49e6,\r
-+ 0xbe, 0x2a, 0x1, 0xed, 0xf1, 0xbd, 0x22, 0xb3);\r
- \r
- typedef struct _INFINIBAND_INTERFACE_CM\r
- {