From: stansmith Date: Thu, 15 May 2008 00:33:24 +0000 (+0000) Subject: [WinOF] added mthca & connectX device_ID specific devcon installs to cover mthca... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=04e47e7ed9f8fe928fcefdd7d1acdb76a6d9b034;p=~shefty%2Frdma-win.git [WinOF] added mthca & connectX device_ID specific devcon installs to cover mthca & connectX both in the same system. Iterate over list of DEV_IDs. git-svn-id: svn://openib.tc.cornell.edu/gen1@1170 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WinOF/WIX/CustomActions.vbs b/branches/WinOF/WIX/CustomActions.vbs index e220d604..78a2d90c 100644 --- a/branches/WinOF/WIX/CustomActions.vbs +++ b/branches/WinOF/WIX/CustomActions.vbs @@ -599,7 +599,7 @@ Function DriverInstall() MTARCH = Architecture Dim PropArray, devID, devman, devmanEXE, devmanNET, devmanQL - Dim rc, cmd, CheckMode, sInstalldir, fso, DrvInstalled + Dim rc, cmd, CheckMode, sInstalldir, fso, DrvInstalled, IBbusGUID ' Get the value of INSTALLDIR CheckMode = Session.Property("CustomActionData") @@ -633,8 +633,8 @@ Function DriverInstall() Set fso = CreateObject("Scripting.FileSystemObject") If Not fso.FileExists(devmanEXE) Then - msgbox "Driver Install - missing file " & devmanEXE - DriverInstall=1 + msgbox "Driver Install - missing file WinOF\" & devmanEXE + DriverInstall=ERROR_FUNCTION_FAILED Exit Function End if @@ -643,50 +643,47 @@ Function DriverInstall() ' Display error number and description if applicable If Err Then ShowError If Return <> 0 Then - msgbox "Driver Install - HCA Ret " & Return & " Err " & Err - DriverInstall=Return + msgbox "Driver Install - failed device rescan? " & Return & " Err "_ + & Err + DriverInstall=ERROR_INSTALL_FAILURE Exit Function End if ' Install an HCA (Host Channel Adapter) Driver + ' Install mthca 2nd as it can tolerate a previously installed IBBUS driver. DrvInstalled = false + IBbusGUID = "{94f41ced-78eb-407c-b5df-958040af0fd8}" - ' XXX temp until Mx support for mthca & mlx4_hca co-loading works - ' [4-16-08] stan + ' ConnectX (mlx4) HCA? - If fso.FileExists(sInstalldir & "IBcore\mlx4_hca.inf") And _ - fso.FileExists(sInstalldir & "IBcore\mthca.inf") Then - msgbox "HCA Driver - Error: loading InfiniHost and ConnectX " _ - & "Not Supported." - DriverInstall=ERROR_INSTALL_FAILURE - Exit Function - End If - - ' InfiniHost HCA? - If fso.FileExists(sInstalldir & "IBcore\mthca.inf") Then - Return = WshShell.Run (devman & "update mthca.inf PCI\VEN_15B3",0,true) - ' Display error number and description if applicable - If Err Then ShowError - If Return <> 0 Then - msgbox "HCA Install - update mthca.inf PCI\VEN_15b3 Ret=" _ - & Return & " Err=" & Err - DriverInstall=ERROR_INSTALL_FAILURE - ' cleanup device database. - Return = WshShell.Run (devman & "remove PCI\VEN_15B3", 0, true) - Exit Function - End if - DrvInstalled = true - End if - - ' ConnectX HCA? If fso.FileExists(sInstalldir & "IBcore\mlx4_hca.inf") Then + ' WORKAROUND - force load ibbus driver - cmd = devman & "install ib_bus.inf {94f41ced-78eb-407c-b5df-958040af0fd8}" + cmd = devman & "install ib_bus.inf " & IBbusGUID Return = WshShell.Run (cmd,0,true) ' END-WORKAROUND - cmd = devman & "update mlx4_bus.inf PCI\VEN_15B3" - Return = WshShell.Run (cmd,0,true) + + Xdevs = Array("6340","634A","6354","6732","673C","0191") + + For each dev in Xdevs + cmd = devman & "update mlx4_bus.inf ""PCI\VEN_15B3&" & dev & """" + Return = WshShell.Run (cmd,0,true) + If Return = 0 Then + DrvInstalled = true + Exit For + End If + Next + + If DrvInstalled <> true Then + msgbox "HCA Install failed - mlx4_bus.inf PCI\VEN_15B3&DEV_*" + ' cleanup device database. + Return = WshShell.Run (devman & "remove PCI\VEN_15B3", 0, true) + Return = WshShell.Run ( devman & "remove " & IBbusGUID,0,true) + DriverInstall=ERROR_INSTALL_FAILURE + Exit Function + End if + cmd = devman & "update mlx4_hca.inf MLX4\CONNECTX_HCA" Return = WshShell.Run (cmd,0,true) ' Display error number and description if applicable @@ -697,11 +694,40 @@ Function DriverInstall() DriverInstall=ERROR_INSTALL_FAILURE ' cleanup device database. Return = WshShell.Run (devman & "remove PCI\VEN_15B3", 0, true) + Return = WshShell.Run ( devman & "remove " & IBbusGUID,0,true) Exit Function End if - DrvInstalled = true End if + ' InfiniHost HCA (mthca)? + + If fso.FileExists(sInstalldir & "IBcore\mthca.inf") Then + + DrvInstalled = false + + devs = Array("5A44","5A45","6278","6279","6282","5E8C","5E8D",_ + "6274","6275") + For each dev in devs + cmd = devman & "update mthca.inf ""PCI\VEN_15B3&DEV_" & dev & """" + Return = WshShell.Run (cmd,0,true) + If Return = 0 Then + DrvInstalled = true + Exit For + End If + Next + + If DrvInstalled <> true Then + msgbox "HCA Install failed - mthca.inf PCI\VEN_15B3&DEV_*" + ' cleanup device database. + Return = WshShell.Run (devman & "remove PCI\VEN_15B3", 0, true) + Return = WshShell.Run ( devman & "remove " & IBbusGUID,0,true) + DriverInstall=ERROR_INSTALL_FAILURE + Exit Function + End if + End if + + ' an HCA driver is 'required'. + if DrvInstalled = false Then msgbox "Driver Install - No HCA Driver Selected to Install?" & _ " Aborting Installation."