Version: 1
-Previous: 9eea322d28b15b4632b2b84f8facec73883c5d45
-Head: 649cfaff80d506c1efbfedef2cb7b7333973f803
+Previous: 10b107fa4e330f0ca4308e896626a6e11ecb01ff
+Head: bfb6d6dd363eaf8687a634c71960015ebae7948e
Applied:
nd-heap: 4073d4bd9835679d69e79783b4fd841e173ec458
wv-reg: 2c86a99e122511e0ef8723c8ec08456f4002a39a
nd-adapt: 89c3aaa5d3df57c2dcc7cbb7042ff6ba2e771925
sge: 84588550c84d1c3edae7eabcc0caad91e3b4c720
mr: 649cfaff80d506c1efbfedef2cb7b7333973f803
+ refresh-temp: bfb6d6dd363eaf8687a634c71960015ebae7948e
Unapplied:
wv-rm-ioctl: 2c4f8b27f89993bc9c1215e8c358046b2934f755
wv-ver: 9abd550558317c525e7f7f82caae75f1a810d2b7
--- /dev/null
+Bottom: 2a412a568f760567b55f58104171fa455e3a744d
+Top: f2a810b29c584db9f46a634adfa70c2f0dc2876e
+Author: Sean Hefty <sean.hefty@intel.com>
+Date: 2010-07-26 17:04:08 -0700
+
+Refresh of mr
+
+---
+
+diff --git a/trunk/ulp/netdirect2/user/nd_mw.cpp b/trunk/ulp/netdirect2/user/nd_mw.cpp
+index 53006f5..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
+@@ -70,10 +71,11 @@ Release(void)
+ STDMETHODIMP CNDMemoryRegion::\r
+ CancelOverlappedRequests(void)\r
+ {\r
+- HRESULT hr;\r
++ if (m_pOverlapped != NULL) {\r
++ CancelIoEx(m_pAdapter->GetFileHandle(), m_pOverlapped);\r
++ }\r
+ \r
+- hr = m_pWvCq->CancelOverlappedRequests();\r
+- return NDConvertWVStatus(hr);\r
++ return ND_SUCCESS;\r
+ }\r
+ \r
+ STDMETHODIMP CNDMemoryRegion::\r
+@@ -82,8 +84,13 @@ GetOverlappedResult(OVERLAPPED *pOverlapped, BOOL bWait)
+ DWORD bytes;\r
+ HRESULT hr;\r
+ \r
+- hr = m_pWvCq->GetOverlappedResult(pOverlapped, &bytes, bWait);\r
+- return NDConvertWVStatus(hr);\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
+@@ -105,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
+@@ -115,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 f4b9fb3..eb0bbc9 100644
+--- a/trunk/ulp/netdirect2/user/nd_mw.h
++++ b/trunk/ulp/netdirect2/user/nd_mw.h
+@@ -83,6 +83,7 @@ public:
+ \r
+ protected:\r
+ CNDAdapter *m_pAdapter;\r
++ OVERLAPPED *m_pOverlapped;\r
+ };