[IBAL/MTHCA/IPOIB/TOOLS] fix inf to search driver in the same directory (not to use...
authorsleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 8 Mar 2007 09:13:32 +0000 (09:13 +0000)
committersleybo <sleybo@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 8 Mar 2007 09:13:32 +0000 (09:13 +0000)
fix co-installer accordingly

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@610 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/ib_bus.inf
hw/mthca/kernel/mthca.inf
tools/coinstaller/user/IbInstaller.cpp
tools/coinstaller/user/SOURCES
ulp/ipoib/kernel/netipoib.inf

index 828ded8..bb16f9c 100644 (file)
@@ -19,13 +19,13 @@ Ibbus.UMCopyFiles=%DIRID_SYSTEM%
 Ibbus.WOW64CopyFiles=%DIRID_SYSTEM_X86%\r
 \r
 [SourceDisksNames.x86]\r
-1=%DiskId%,,,\x86\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksNames.amd64]\r
-1=%DiskId%,,,\amd64\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksNames.ia64]\r
-1=%DiskId%,,,\ia64\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksFiles.x86]\r
 ibbus.sys=1\r
index f2245de..00bf062 100644 (file)
@@ -36,13 +36,13 @@ HKLM,"System\CurrentControlSet\Control\CoDeviceInstallers", \
 ; ================= Device Install section =====================\r
 \r
 [SourceDisksNames.x86]\r
-1=%DiskId%,,,\x86\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksNames.amd64]\r
-1=%DiskId%,,,\amd64\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksNames.ia64]\r
-1=%DiskId%,,,\ia64\r
+1=%DiskId%,,,""\r
 \r
 [SourceDisksFiles]\r
 IbInstaller.dll=1\r
index 31b9a36..d3a7e7b 100644 (file)
@@ -35,6 +35,7 @@
 \r
 #include "stdafx.h"\r
 \r
+wchar_t  debug_buf[256];\r
 \r
 // IB Fabric device HW ID\r
 #define GUID_IB_BUS_HW_ID      TEXT("{94f41ced-78eb-407c-b5df-958040af0fd8}")\r
@@ -80,8 +81,8 @@ DWORD NeedInstall()
        hDevList = SetupDiGetClassDevs( &GUID_CLASS_SYSTEM, 0, NULL, 0 );\r
        if( hDevList == INVALID_HANDLE_VALUE )\r
        {\r
-               OutputDebugString(\r
-                       TEXT("Failed to get system class dev info list.\n") );\r
+               swprintf( debug_buf,L"[IbInstaller] Failed to get system class dev info list Error %d\n",GetLastError());\r
+               OutputDebugString( debug_buf );\r
                return GetLastError();\r
        }\r
 \r
@@ -133,13 +134,15 @@ DWORD SelectDriver(
 {\r
        DWORD   i;\r
        BOOL    bSuccess;\r
+       \r
 \r
        // Get a list of drivers.\r
        bSuccess =\r
                SetupDiBuildDriverInfoList( hDevList, pDevInfo, SPDIT_CLASSDRIVER );\r
        if( !bSuccess )\r
        {\r
-               OutputDebugString( TEXT("SetupDiBuildDriverInfoList failed.\n") );\r
+               swprintf( debug_buf,L"[IbInstaller] SetupDiBuildDriverInfoList failed Error %d\n",GetLastError());\r
+               OutputDebugString( debug_buf );\r
                return GetLastError();\r
        }\r
 \r
@@ -150,14 +153,20 @@ DWORD SelectDriver(
        i = 0;\r
        do\r
        {\r
+\r
                bSuccess = SetupDiEnumDriverInfo( hDevList, pDevInfo,\r
                        SPDIT_CLASSDRIVER, i++, pDrvInfo );\r
                if( !bSuccess )\r
                {\r
-                       OutputDebugString( TEXT("SetupDiEnumDriverInfo failed.\n") );\r
+                       swprintf( debug_buf,L"[IbInstaller] SetupDiEnumDriverInfo failed Error %d\n",GetLastError());\r
+                       OutputDebugString( debug_buf );\r
                        break;\r
                }\r
 \r
+               // make the string\r
+               swprintf( debug_buf,TEXT("[IbInstaller]  pDrvInfo->Description %s\n"),pDrvInfo->Description);\r
+               OutputDebugString( debug_buf );\r
+               \r
                if( _tcscmp( pDrvInfo->Description, DEVICE_DESC ) )\r
                        continue;\r
 \r
@@ -182,6 +191,7 @@ CreateIbBusRoot(
        LONG                                    status;\r
        SP_DEVINSTALL_PARAMS    installParams;\r
 \r
+\r
        memset( &devInfo, 0, sizeof(SP_DEVINFO_DATA) );\r
        devInfo.cbSize = sizeof(SP_DEVINFO_DATA);\r
 \r
@@ -369,14 +379,20 @@ IbCoInstaller(
        nEnd = _tcslen( path );\r
        while( path[nEnd] != '\\' )\r
                nEnd--;\r
+/*\r
+       NOTE: no need to strip the platform directoty it was removed for WHQL\r
        // Skip the slash.\r
        nEnd--;\r
        // Strip the platform subdir name from the path.\r
        while( path[nEnd] != '\\' )\r
                nEnd--;\r
-\r
+*/\r
        path[nEnd] = _T('\0');\r
 \r
+       swprintf( debug_buf ,L"[IbInstaller] path %s\n",path);\r
+       OutputDebugString( debug_buf );\r
+\r
+\r
        // Create the bus root.\r
        result = CreateIbBusRoot( path );\r
        if( result != ERROR_SUCCESS )\r
index 6aed695..b50482c 100644 (file)
@@ -8,6 +8,8 @@ SOURCES= IbInstaller.rc         \
 PRECOMPILED_INCLUDE=stdafx.h\r
 PRECOMPILED_CXX=1\r
 \r
+USE_MSVCRT=1\r
+\r
 C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE\r
 \r
 TARGETLIBS=$(SDK_LIB_PATH)\setupapi.lib                \\r
index 45b601d..c538240 100644 (file)
@@ -157,13 +157,13 @@ ibwsd.dll,,,0x00000002
 ibwsd.dll,ibwsd32.dll,,0x00000002\r
 \r
 [SourceDisksNames.x86]\r
-1 = %IcsDisk1%,,,\x86\r
+1 = %IcsDisk1%,,,""\r
 \r
 [SourceDisksNames.amd64]\r
-1 = %IcsDisk1%,,,\amd64\r
+1 = %IcsDisk1%,,,""\r
 \r
 [SourceDisksNames.ia64]\r
-1 = %IcsDisk1%,,,\ia64\r
+1 = %IcsDisk1%,,,""\r
 \r
 [SourceDisksFiles.x86]\r
 ipoib.sys = 1\r