Bottom: fa748f1c52b43305bedd9af43719f0863bbecab5
-Top: 63c882c8247675acf9df13d96a1beba51a1e0858
+Top: 9f754288917224d5cc6537c9267e9e00ce970062
Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
Date: 2010-01-06 10:08:50 -0800
p_ifc->send_rep = cm_send_rep;\r
p_ifc->send_rtu = cm_send_rtu;\r
diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c
-index 4987207..ea12045 100644
+index 4987207..d2bee9e 100644
--- a/trunk/core/al/kernel/al_cm_cep.c
+++ b/trunk/core/al/kernel/al_cm_cep.c
-@@ -6376,7 +6376,7 @@ al_cep_poll(
- {\r
- ib_api_status_t status;\r
- kcep_t *p_cep;\r
-- KLOCK_QUEUE_HANDLE hdl;\r
-+ KIRQL irql;\r
- \r
- AL_PRINT( TRACE_LEVEL_VERBOSE, AL_DBG_CM, ("[ CID = %d\n", cid) );\r
- \r
-@@ -6384,11 +6384,11 @@ al_cep_poll(
- CL_ASSERT( p_new_cid );\r
- CL_ASSERT( pp_mad );\r
- \r
-- KeAcquireInStackQueuedSpinLock( &gp_cep_mgr->lock, &hdl );\r
-+ KeAcquireSpinLock( &gp_cep_mgr->lock, &irql );\r
- p_cep = __lookup_cep( h_al, cid );\r
- if( !p_cep )\r
- {\r
-- KeReleaseInStackQueuedSpinLock( &hdl );\r
-+ KeReleaseSpinLock( &gp_cep_mgr->lock, irql );\r
- AL_EXIT( AL_DBG_CM );\r
- return IB_INVALID_HANDLE;\r
- }\r
-@@ -6417,7 +6417,7 @@ al_cep_poll(
- status = IB_SUCCESS;\r
- \r
- done:\r
-- KeReleaseInStackQueuedSpinLock( &hdl );\r
-+ KeReleaseSpinLock( &gp_cep_mgr->lock, irql );\r
- AL_PRINT( TRACE_LEVEL_VERBOSE, AL_DBG_CM, ("] return %d\n", status) );\r
- return status;\r
- }\r
@@ -6652,7 +6652,7 @@ kal_cep_get_context(
goto out;\r
}\r
pfn_addref( context );\r
}\r
diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c
-index 3d5c6ce..3a9e02f 100644
+index 3d5c6ce..bfa7f54 100644
--- a/trunk/core/winverbs/kernel/wv_ep.c
+++ b/trunk/core/winverbs/kernel/wv_ep.c
-@@ -1110,60 +1110,124 @@ complete:
+@@ -1110,60 +1110,75 @@ complete:
WdfRequestComplete(Request, status);\r
}\r
\r
- status = WdfIoQueueRetrieveNextRequest(listen->Queue, &request);\r
- if (!NT_SUCCESS(status)) {\r
- goto release;\r
-- }\r
+ status = IbCmInterface.CM.get_request(pListen->pIbCmId, &id, &event);\r
+ if (!NT_SUCCESS(status)) {\r
+ WdfRequestRequeue(request);\r
+\r
+ ep->State = WvEpPassiveConnect;\r
+ WvEpPut(ep);\r
++\r
++ WdfRequestComplete(request, STATUS_SUCCESS);\r
+ }\r
++ WdfObjectReleaseLock(pListen->Queue);\r
++}\r
\r
- ASSERT(!IsListEmpty(&listen->Entry));\r
- ep = CONTAINING_RECORD(RemoveHeadList(&listen->Entry), WV_ENDPOINT, Entry);\r
- ep->pIbCmId = pId;\r
- pId->callback = WvEpIbCmHandler;\r
- pId->context = ep;\r
-+ WdfRequestComplete(request, STATUS_SUCCESS);\r
-+ }\r
-+ WdfObjectReleaseLock(pListen->Queue);\r
-+}\r
++static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent)\r
++{\r
++ WV_ENDPOINT *listen;\r
\r
- hdr = pEvent->data.req.req.p_pdata;\r
- if ((hdr->IpVersion >> 4) == 4) {\r
-release:\r
- WdfObjectReleaseLock(listen->Queue);\r
- return status;\r
-+static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent)\r
-+{\r
-+ WV_ENDPOINT *listen;\r
-+//, *ep;\r
-+// WDFREQUEST request;\r
-+// NTSTATUS status;\r
-+// IB_CMA_HEADER *hdr;\r
-+\r
-+ listen = pId->context; //((iba_cm_id *) pId->context)->context;\r
++ listen = pId->context;\r
+ WvEpGetIbRequest(listen);\r
+ return STATUS_SUCCESS;\r
-+// WdfObjectAcquireLock(listen->Queue);\r
-+// status = WdfIoQueueRetrieveNextRequest(listen->Queue, &request);\r
-+// if (!NT_SUCCESS(status)) {\r
-+// goto release;\r
-+// }\r
-+//\r
-+// ASSERT(!IsListEmpty(&listen->Entry));\r
-+// ep = CONTAINING_RECORD(RemoveHeadList(&listen->Entry), WV_ENDPOINT, Entry);\r
-+// ep->pIbCmId = pId;\r
-+// pId->callback = WvEpIbCmHandler;\r
-+// pId->context = ep;\r
-+//\r
-+// hdr = pEvent->data.req.req.p_pdata;\r
-+// if ((hdr->IpVersion >> 4) == 4) {\r
-+// ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET;\r
-+// ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address;\r
-+// ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET;\r
-+// ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address;\r
-+// } else {\r
-+// ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; \r
-+// RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr,\r
-+// hdr->DstAddress.Ip6Address, 16);\r
-+// ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6;\r
-+// RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr,\r
-+// hdr->SrcAddress.Ip6Address, 16);\r
-+// }\r
-+// ep->Attributes.Device.DeviceGuid = pEvent->data.req.local_ca_guid;\r
-+// ep->Attributes.Device.Pkey = pEvent->data.req.req.p_primary_path->pkey;\r
-+// ep->Attributes.Device.PortNumber = pEvent->data.req.port_num;\r
-+// ep->Attributes.Param.Connect.ResponderResources = pEvent->data.req.req.resp_res;\r
-+// ep->Attributes.Param.Connect.InitiatorDepth = pEvent->data.req.req.init_depth;\r
-+// ep->Attributes.Param.Connect.RetryCount = pEvent->data.req.req.retry_cnt;\r
-+// ep->Attributes.Param.Connect.RnrRetryCount = pEvent->data.req.req.rnr_retry_cnt;\r
-+// ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data);\r
-+// RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1,\r
-+// sizeof(ep->Attributes.Param.Connect.Data));\r
-+// ep->Route = *pEvent->data.req.req.p_primary_path;\r
-+//\r
-+// ep->State = WvEpPassiveConnect;\r
-+// WvEpPut(ep);\r
-+//\r
-+// WdfRequestComplete(request, STATUS_SUCCESS);\r
-+//release:\r
-+// WdfObjectReleaseLock(listen->Queue);\r
-+// return status;\r
}\r
\r
void WvEpListen(WV_PROVIDER *pProvider, WDFREQUEST Request)\r
-@@ -1235,24 +1299,24 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
+@@ -1235,24 +1250,24 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
status = WdfRequestRetrieveInputBuffer(Request, sizeof(WV_IO_EP_GET_REQUEST),\r
&req, NULL);\r
if (!NT_SUCCESS(status)) {\r
}\r
\r
WdfObjectAcquireLock(ep->Queue);\r
-@@ -1262,9 +1326,8 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
+@@ -1262,9 +1277,8 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
status = STATUS_CONNECTION_IN_USE;\r
}\r
WdfObjectReleaseLock(ep->Queue);\r
}\r
\r
WdfObjectAcquireLock(listen->Queue);\r
-@@ -1274,15 +1337,21 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
+@@ -1274,15 +1288,21 @@ void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request)
WvEpGet(ep);\r
}\r
WdfObjectReleaseLock(listen->Queue);\r
+++ /dev/null
-Bottom: 63c882c8247675acf9df13d96a1beba51a1e0858
-Top: 9f754288917224d5cc6537c9267e9e00ce970062
-Author: U-AMR\MSHEFTY <MSHEFTY@mshefty-MOBL2.amr.corp.intel.com>
-Date: 2010-01-06 21:33:37 -0800
-
-Refresh of cm_poll
-
----
-
-diff --git a/trunk/core/al/kernel/al_cm_cep.c b/trunk/core/al/kernel/al_cm_cep.c
-index ea12045..d2bee9e 100644
---- a/trunk/core/al/kernel/al_cm_cep.c
-+++ b/trunk/core/al/kernel/al_cm_cep.c
-@@ -6376,7 +6376,7 @@ al_cep_poll(
- {\r
- ib_api_status_t status;\r
- kcep_t *p_cep;\r
-- KIRQL irql;\r
-+ KLOCK_QUEUE_HANDLE hdl;\r
- \r
- AL_PRINT( TRACE_LEVEL_VERBOSE, AL_DBG_CM, ("[ CID = %d\n", cid) );\r
- \r
-@@ -6384,11 +6384,11 @@ al_cep_poll(
- CL_ASSERT( p_new_cid );\r
- CL_ASSERT( pp_mad );\r
- \r
-- KeAcquireSpinLock( &gp_cep_mgr->lock, &irql );\r
-+ KeAcquireInStackQueuedSpinLock( &gp_cep_mgr->lock, &hdl );\r
- p_cep = __lookup_cep( h_al, cid );\r
- if( !p_cep )\r
- {\r
-- KeReleaseSpinLock( &gp_cep_mgr->lock, irql );\r
-+ KeReleaseInStackQueuedSpinLock( &hdl );\r
- AL_EXIT( AL_DBG_CM );\r
- return IB_INVALID_HANDLE;\r
- }\r
-@@ -6417,7 +6417,7 @@ al_cep_poll(
- status = IB_SUCCESS;\r
- \r
- done:\r
-- KeReleaseSpinLock( &gp_cep_mgr->lock, irql );\r
-+ KeReleaseInStackQueuedSpinLock( &hdl );\r
- AL_PRINT( TRACE_LEVEL_VERBOSE, AL_DBG_CM, ("] return %d\n", status) );\r
- return status;\r
- }\r
-diff --git a/trunk/core/winverbs/kernel/wv_ep.c b/trunk/core/winverbs/kernel/wv_ep.c
-index 3a9e02f..bfa7f54 100644
---- a/trunk/core/winverbs/kernel/wv_ep.c
-+++ b/trunk/core/winverbs/kernel/wv_ep.c
-@@ -1175,59 +1175,10 @@ static void WvEpGetIbRequest(WV_ENDPOINT *pListen)
- static NTSTATUS WvEpIbListenHandler(iba_cm_id *pId, iba_cm_event *pEvent)\r
- {\r
- WV_ENDPOINT *listen;\r
--//, *ep;\r
--// WDFREQUEST request;\r
--// NTSTATUS status;\r
--// IB_CMA_HEADER *hdr;\r
- \r
-- listen = pId->context; //((iba_cm_id *) pId->context)->context;\r
-+ listen = pId->context;\r
- WvEpGetIbRequest(listen);\r
- return STATUS_SUCCESS;\r
--// WdfObjectAcquireLock(listen->Queue);\r
--// status = WdfIoQueueRetrieveNextRequest(listen->Queue, &request);\r
--// if (!NT_SUCCESS(status)) {\r
--// goto release;\r
--// }\r
--//\r
--// ASSERT(!IsListEmpty(&listen->Entry));\r
--// ep = CONTAINING_RECORD(RemoveHeadList(&listen->Entry), WV_ENDPOINT, Entry);\r
--// ep->pIbCmId = pId;\r
--// pId->callback = WvEpIbCmHandler;\r
--// pId->context = ep;\r
--//\r
--// hdr = pEvent->data.req.req.p_pdata;\r
--// if ((hdr->IpVersion >> 4) == 4) {\r
--// ep->Attributes.LocalAddress.SockAddr.In.SinFamily = WV_AF_INET;\r
--// ep->Attributes.LocalAddress.SockAddr.In.SinAddr = hdr->DstAddress.Ip4.Address;\r
--// ep->Attributes.PeerAddress.SockAddr.In.SinFamily = WV_AF_INET;\r
--// ep->Attributes.PeerAddress.SockAddr.In.SinAddr = hdr->SrcAddress.Ip4.Address;\r
--// } else {\r
--// ep->Attributes.LocalAddress.SockAddr.In6.Sin6Family = WV_AF_INET6; \r
--// RtlCopyMemory(ep->Attributes.LocalAddress.SockAddr.In6.Sin6Addr,\r
--// hdr->DstAddress.Ip6Address, 16);\r
--// ep->Attributes.PeerAddress.SockAddr.In6.Sin6Family = WV_AF_INET6;\r
--// RtlCopyMemory(ep->Attributes.PeerAddress.SockAddr.In6.Sin6Addr,\r
--// hdr->SrcAddress.Ip6Address, 16);\r
--// }\r
--// ep->Attributes.Device.DeviceGuid = pEvent->data.req.local_ca_guid;\r
--// ep->Attributes.Device.Pkey = pEvent->data.req.req.p_primary_path->pkey;\r
--// ep->Attributes.Device.PortNumber = pEvent->data.req.port_num;\r
--// ep->Attributes.Param.Connect.ResponderResources = pEvent->data.req.req.resp_res;\r
--// ep->Attributes.Param.Connect.InitiatorDepth = pEvent->data.req.req.init_depth;\r
--// ep->Attributes.Param.Connect.RetryCount = pEvent->data.req.req.retry_cnt;\r
--// ep->Attributes.Param.Connect.RnrRetryCount = pEvent->data.req.req.rnr_retry_cnt;\r
--// ep->Attributes.Param.Connect.DataLength = sizeof(ep->Attributes.Param.Connect.Data);\r
--// RtlCopyMemory(ep->Attributes.Param.Connect.Data, hdr + 1,\r
--// sizeof(ep->Attributes.Param.Connect.Data));\r
--// ep->Route = *pEvent->data.req.req.p_primary_path;\r
--//\r
--// ep->State = WvEpPassiveConnect;\r
--// WvEpPut(ep);\r
--//\r
--// WdfRequestComplete(request, STATUS_SUCCESS);\r
--//release:\r
--// WdfObjectReleaseLock(listen->Queue);\r
--// return status;\r
- }\r
- \r
- void WvEpListen(WV_PROVIDER *pProvider, WDFREQUEST Request)