Remove some dead code from IBAT.

Using guarded mutexes on win8 raises IRQL to APC, despite what the WDK docs 
state.  This causes problems for IPHelper.  The code I sent for IBAT already 
contained the changes to use a regular mutex, but left the guarded mutex code 
commented out.  This patch removes the commented out code.

Signed-off-by: Fab Tillier <[email protected]>

diff -dwup3 -X excl.txt -r 
\dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\ibat\kernel\ibat.cpp 
.\core\ibat\kernel\ibat.cpp
--- \dev\openib\ofw\gen1\branches\mlx4_30\trunk\core\ibat\kernel\ibat.cpp       
Tue Aug 07 16:41:02 2012
+++ .\core\ibat\kernel\ibat.cpp Wed Aug 08 12:49:24 2012
@@ -61,7 +61,6 @@ static KSPIN_LOCK g_ibatPortLock;
 //
 #if OSVER(NTDDI_VERSION) <= OSVER(NTDDI_WIN7)
 static KMUTEX g_ibatResolveMutex;
-//static KGUARDED_MUTEX g_ibatResolveMutex;
 #endif
 static MIB_UNICASTIPADDRESS_TABLE* g_ibatUnicastAddressTable;
 static HANDLE g_hIbatAddressNotification;
@@ -133,7 +132,6 @@ IbatInitialize()
     RtlZeroMemory( g_ibatPorts, sizeof(g_ibatPorts) );
 #if OSVER(NTDDI_VERSION) <= OSVER(NTDDI_WIN7)
     KeInitializeMutex( &g_ibatResolveMutex, 0 );
-    //KeInitializeGuardedMutex( &g_ibatResolveMutex );
 #endif
     KeInitializeSpinLock( &g_ibatPortLock );
     g_ibatUnicastAddressTable = NULL;
@@ -698,17 +696,14 @@ IbatpResolveRemoteAddressUnsafe(
 
 #if OSVER(NTDDI_VERSION) <= OSVER(NTDDI_WIN7)
     KeWaitForSingleObject( &g_ibatResolveMutex, UserRequest, KernelMode, 
FALSE, NULL );
-    //KeAcquireGuardedMutex( &g_ibatResolveMutex );
 #endif
     status = GetIpNetEntry2( &row );
     if( NT_SUCCESS( status ) && row.State < NlnsReachable )
     {
-        NT_ASSERT( KeGetCurrentIrql() == PASSIVE_LEVEL );
         status = ResolveIpNetEntry2( &row, pLocalAddress );
     }
 #if OSVER(NTDDI_VERSION) <= OSVER(NTDDI_WIN7)
     KeReleaseMutex( &g_ibatResolveMutex, FALSE );
-    //KeReleaseGuardedMutex( &g_ibatResolveMutex );
 #endif
 
     if( !NT_SUCCESS( status ) )

Attachment: ndv2.38.patch
Description: ndv2.38.patch

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to