Version: 1
-Previous: 383b1a018d293a2d43a75e40b46c3ef0e21d4672
+Previous: 5fcf2671a106a72d1866e312e7c5aee247591913
Head: 25ad766803075cc4ab0b81aa369249ad8e1a2202
Applied:
nd2: 170d73d4ced1a1c881e227eaa17554d3f38746d2
wv-reg: 022e07ace7f63972967ff1f65adba7fe69fde82d
nd-prov: cbb3db7630ada85f1f30a53bf85dbce8399c3ea5
nd-adapt-query: 9e42f9b785e063c75b6f87b241f4b100877b86e9
+ mr: 25ad766803075cc4ab0b81aa369249ad8e1a2202
Unapplied:
sge: f00370179e2dcdfb8aaf58da81785439872a8557
- mr: 08fda6a1a2612a27925c8afaf1af286a65469af5
srq-32: 39a3c8243009a85178c8ade30dba40951505c976
qp-init: 3ce5be880bc3297ab73922e54201e2053b2403b3
qp-flush: deca6b3f6a846fab3879e5b9050ba810dcaf991f
-Bottom: 6e09d66b7501a9b4ba07765b3e95b266618e6ba3
-Top: d3479d116ff5a108058c5d9a747892a3388c40a8
+Bottom: 32e9ce2192e23e4f19ba5457d5d193a52ad071a6
+Top: 32e9ce2192e23e4f19ba5457d5d193a52ad071a6
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2010-07-26 16:51:57 -0700
---
-diff --git a/trunk/ulp/netdirect2/user/nd_mw.cpp b/trunk/ulp/netdirect2/user/nd_mw.cpp
-index be5446d..f6a85bf 100644
---- a/trunk/ulp/netdirect2/user/nd_mw.cpp
-+++ b/trunk/ulp/netdirect2/user/nd_mw.cpp
-@@ -35,6 +35,7 @@ CNDMemoryRegion::CNDMemoryRegion(CNDAdapter *pAdapter)
- pAdapter->AddRef();\r
- m_pAdapter = pAdapter;\r
- RtlZeroMemory(&m_Keys, sizeof(m_Keys));\r
-+ m_pOverlapped = NULL;\r
- }\r
- \r
- CNDMemoryRegion::~CNDMemoryRegion()\r
-@@ -67,6 +68,31 @@ Release(void)
- return CNDBase::Release();\r
- }\r
- \r
-+STDMETHODIMP CNDMemoryRegion::\r
-+CancelOverlappedRequests(void)\r
-+{\r
-+ if (m_pOverlapped != NULL) {\r
-+ CancelIoEx(m_pAdapter->GetFileHandle(), m_pOverlapped);\r
-+ }\r
-+\r
-+ return ND_SUCCESS;\r
-+}\r
-+\r
-+STDMETHODIMP CNDMemoryRegion::\r
-+GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)\r
-+{\r
-+ DWORD bytes;\r
-+ HRESULT hr;\r
-+\r
-+ hr = NDConvertWVStatus(m_pAdapter->m_pWvPd->\r
-+ GetOverlappedResult(pOverlapped, &bytes, bWait));\r
-+ if (hr != ND_PENDING) {\r
-+ m_pOverlapped = NULL;\r
-+ }\r
-+\r
-+ return hr;\r
-+}\r
-+\r
- DWORD ConvertAccessFlags(DWORD Flags)\r
- {\r
- DWORD opts = 0;\r
-@@ -86,6 +112,7 @@ Register(const VOID* pBuffer, SIZE_T cbBuffer, DWORD flags, OVERLAPPED* pOverlap
- {\r
- HRESULT hr;\r
- \r
-+ m_pOverlapped = pOverlapped;\r
- hr = m_pAdapter->m_pWvPd->RegisterMemory(pBuffer, cbBuffer, ConvertAccessFlags(flags),\r
- pOverlapped, &m_Keys);\r
- return NDConvertWVStatus(hr);\r
-@@ -96,7 +123,7 @@ Deregister(OVERLAPPED* pOverlapped)
- {\r
- HRESULT hr;\r
- \r
-- //??? if the lkey is not unique, we need to change this\r
-+ m_pOverlapped = pOverlapped;\r
- hr = m_pAdapter->m_pWvPd->DeregisterMemory(m_Keys.Lkey, pOverlapped);\r
- return NDConvertWVStatus(hr);\r
- }\r
-diff --git a/trunk/ulp/netdirect2/user/nd_mw.h b/trunk/ulp/netdirect2/user/nd_mw.h
-index 47c18b2..eb0bbc9 100644
---- a/trunk/ulp/netdirect2/user/nd_mw.h
-+++ b/trunk/ulp/netdirect2/user/nd_mw.h
-@@ -45,6 +45,10 @@ public:
- STDMETHODIMP_(ULONG) AddRef();\r
- STDMETHODIMP_(ULONG) Release();\r
- \r
-+ // INDOverlapped methods\r
-+ STDMETHODIMP CancelOverlappedRequests();\r
-+ STDMETHODIMP GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait);\r
-+\r
- // INDMemoryRegion methods\r
- STDMETHODIMP Register(const VOID* pBuffer, SIZE_T cbBuffer, DWORD flags,\r
- OVERLAPPED* pOverlapped);\r
-@@ -79,6 +83,7 @@ public:
- \r
- protected:\r
- CNDAdapter *m_pAdapter;\r
-+ OVERLAPPED *m_pOverlapped;\r
- };
+