Blame | Last modification | View Log | Download
;*******************************************************************************; Module Description:;; InfVersion 9.52.0.0.B;*******************************************************************************[Identification]OptionType = NetAdapter[Options]B57NT4[PlatformsSupported]PCI[LanguagesSupported]ENG, English[RequestedMediaTypeB57NT4]"Auto", 0"10 Mb Half", 3"10 Mb Full", 4"100 Mb Half", 5"100 Mb Full", 6[FlowControlCapB57NT4]"Disable", 0"Rx Pause", 1"Tx Pause", 2"Rx/Tx Pause", 3"Auto", 2147483648[RxMtuB57NT4]"1500", 1500"2000", 2000"2500", 2500"3000", 3000"3500", 3500"4000", 4000"4500", 4500"5000", 5000"5500", 5500"6000", 6000"6500", 6500"7000", 7000"7500", 7500"8000", 8000"8500", 8500"9000", 9000[OptionsTextENG]B57NT4 = "Gigabit Ethernet Controller"[FileConstants]UtilityInf = "UTILITY.INF"SubroutineInf = "SUBROUTN.INF"MAXIMUM_ALLOWED = 33554432NoTitle = 0Manufacturer = "Broadcom"ProductMajorVersion = "9"ProductMinorVersion = "52"ProductVersion = $(ProductMajorVersion)"."$(ProductMinorVersion)NetEventDll = "%SystemRoot%\System32\netevent.dll;%SystemRoot%\System32\drivers\B57NT4.sys"ProductSoftwareImagePath = "\SystemRoot\System32\drivers\B57NT4.sys"B57dtectDll = "b57dtect.dll"MiniportProductName = "B57NT4"MiniportProductKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)+"\"$(MiniportProductName)+"\CurrentVersion"MiniportSoftwareType = "driver"MiniportNetRuleSoftwareUse = $(MiniportSoftwareType)MiniportNetRuleSoftwareClass = {"B57NT4Driver basic"}MiniportNetRuleSoftwareType = "B57NT4Sys ndisDriver B57NT4Driver"MiniportNetRuleSoftwareBindForm = """B57NT4Sys"" yes no container"MiniportNetRuleSoftwareBindable = {"B57NT4Driver B57NT4Adapter non "+"exclusive 100"}MiniportNetRuleHardwareType = "B57NT4 B57NT4Adapter"MiniportNetRuleHardwareBindForm = " yes yes container"MiniportNetRuleHardwareClass = {"B57NT4Adapter basic"}ServiceKeyName = "SYSTEM\CurrentControlSet\Services"NetworkCardKeyName = $(!NTN_SoftwareBase)"\Microsoft\"+"Windows NT\CurrentVersion\NetworkCards"B57NT4HelpId = 100B57NT4HelpFile = "b57nt4.hlp"IBM_HPP_ServiceKey = "SYSTEM\CurrentControlSet\Services\"+"HotSrv\SupportedDevices\14E4-1644-14E4-1644"CPQ_HPP_Key = "SOFTWARE\Compaq\Cpqrcmc\ClassDLLs\"+"NicMiniPort"[FileConstantsENG]FunctionB57NT4Title = "Broadcom NetXtreme Gigabit Ethernet"MiniportProductSoftwareTitle = $(FunctionB57NT4Title)MiniportProductSoftwareDisplayName = "Broadcom NetXtreme Gigabit Ethernet"MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet"MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet NDIS 4.0 Driver "+"Version "$(ProductVersion)"."MessageBoxTitle = "Gigabit Ethernet Driver"MsgShellErrorTitle = "Error: "$(Function$(OptionId)Title)MsgShellErrorText = "Shell Code Error."MsgRegistryKeyDoesNotExist = "Open registry key failed."MsgNoAdapterFound = "Network card is not present in the system."MsgDowngrade = "Cannot downgrade to an older driver. To downgrade, "+"you must uninstall first and then re-install the older driver."MsgUpdateDone = "Driver update will take effect on the next reboot."MsgCannotFindB57dtectDll = "Cannot load B57dtect.dll file."MsgUntestedServicePack = "The Gigabit driver has not been tested on "+"this Service Pack release. We recommend that you apply Service "+"Pack 4 or greater upon completion of the driver installation. "+"Would you like to continue?"[DialogConstantsENG]Help = "&Help"Exit = "C&ancel"OK = "&OK"HelpContext = ""Continue = "&Continue"Cancel = "C&ancel"[RequestedMediaTypeDlgENG]DlgText = "Select the line speed and duplex mode to connect "+"to the network. The recommended selection is 'Auto' "+"which sets up the adapter to auto detect the optimal "+"connection."DlgTemplate = "WD"DlgType = "Combination"Caption = "Configurable Driver Parameters."Combo1Label = "&Speed && Duplex:"Combo1List = $(ConnectionList)Combo1Out = $(ConnectionValue)Combo2Label = "&Flow Control:"Combo2List = $(FlowControlCapList)Combo2Out = $(FlowControlCapValue)Combo3Label = "&Jumbo Mtu:"Combo3List = $(RxMtuList)Combo3Out = $(RxMtuValue)ComboListItemsIn = { Combo1List, Combo2List, Combo3List }ComboListItemsOut = { Combo1Out, Combo2Out, Combo3Out }EditTextLim = ""CBOptionsGreyed = {}MinHelpId = 100MaxHelpId = 1000HelpContext = $($(OptionId)HelpId)[RequestedMediaTypeADlgENG]DlgText = "Select the line speed and duplex mode to connect "+"to the network. The recommended selection is 'Auto' "+"which sets up the adapter to auto detect the optimal "+"connection."DlgTemplate = "NE2000"DlgType = "Combination"Caption = "Configurable Driver Parameters."Label1 = "&Speed && Duplex:"Label2 = "&Flow Control:"; Combo1Label = "&Speed && Duplex:"Combo1List = $(ConnectionList)Combo1Out = $(ConnectionValue); Combo2Label = "&Flow Control:"Combo2List = $(FlowControlCapList)Combo2Out = $(FlowControlCapValue)ComboListItemsIn = { Combo1List, Combo2List }ComboListItemsOut = { Combo1Out, Combo2Out }EditTextLim = ""CBOptionsGreyed = {}MinHelpId = 100MaxHelpId = 1000HelpContext = $($(OptionId)HelpId)[DebugControl]!DebugOutputControl = 0[CurrentDate]Now = {} ? $(!LIBHANDLE) GetSystemDate[Source Media Descriptions]1 = "Broadcom NetXtreme Installation Media", TAGFILE = b57nt4.sys[Files-B57NT4Driver]1, b57nt4.sys, SIZE=999[Files-B57NT4Help]1, b57nt4.hlp, SIZE=999[Files-Other]1, b57dtect.dll, SIZE=65;*******************************************************************************; Description:;; Input:; None.;; Output:; None.;*******************************************************************************[ShowShellErrorMessage]read-syms DebugControldebug-output "### ShowShellErrorMessage"read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)set DlgType = "MessageBox"set STF_MB_TITLE = $(MsgShellErrorTitle)set STF_MB_TEXT = $(MsgShellErrorText)set STF_MB_TYPE = 1set STF_MB_ICON = 3set STF_MB_DEF = 1ui start "Error Message"return;*******************************************************************************; Description:;; Input:; $($0) = "WARNING", "FATAL", "NONFATAL", or "STATUS"; $($1) = Registery fatal text code.;; Output:; STATUS_FAILED; STATUS_SUCCESSFUL;*******************************************************************************[ShowRegistryErrorMessage]read-syms DebugControldebug-output "### ShowRegistryErrorMessage"read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)set Severity = $($0)set RegStrCode = $($1)shell $(UtilityInf) RegistryErrorString $(RegStrCode)ifint $($ShellCode) != $(!SHELL_CODE_OK)shell "" ShowShellErrorMessagereturn STATUS_FAILEDendifset RegText = $($R0)shell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) $(Severity) $(RegText)return STATUS_SUCCESSFUL;*******************************************************************************; Description:; Displays shell error message.;; Input:; $($0) = "WARNING", "FATAL", "NONFATAL", or "STATUS"; $($1) = Fatal text string.;; Output:; None.;*******************************************************************************[ShowErrorMessage]read-syms DebugControldebug-output "### ShowErrorMessage"read-syms FileConstantsshell $(SubroutineInf) SetupMessage $(!STF_LANGUAGE) $($0) $($1)ifint $($ShellCode) != $(!SHELL_CODE_OK)shell "" ShowShellErrorMessageendifreturn;*******************************************************************************; Description:;; Input:;; Output:;*******************************************************************************[Install-Help]debug-output "### Install-Help"set STF_VITAL = ""set STF_OVERWRITE = "ALWAYS"AddSectionFilesToCopyList Files-$(OptionId)Help $(SrcDir) +$(!STF_WINDOWSSYSPATH)set !STF_OVERWRITE = TRUEset !STF_NCPA_FLUSH_COPYLIST = TRUECopyFilesInCopyListexit;*******************************************************************************; Description:;; Input:;; Output:;*******************************************************************************[Install-Update]debug-output "### Install-Update"set STF_VITAL = ""set STF_OVERWRITE = "VERIFYSOURCEOLDER"AddSectionFilesToCopyList Files-$(OptionId)Driver $(SrcDir) +$(!STF_WINDOWSSYSPATH)\driversAddSectionFilesToCopyList Files-$(OptionId)Help $(SrcDir) +$(!STF_WINDOWSSYSPATH)AddSectionFilesToCopyList Files-Other $(SrcDir) $(!STF_WINDOWSSYSPATH)set !STF_NCPA_FLUSH_COPYLIST = TRUECopyFilesInCopyListexit;*******************************************************************************; Description:;; Input:; None.;; Output:; None.;*******************************************************************************[Install-Option]debug-output "### Install-Option"; Copy files.set STF_VITAL = ""ifstr(i) $(AddCopy) == "YES"debug-output "Add driver file to copy list."AddSectionFilesToCopyList Files-$(OptionId)Driver $(SrcDir) +$(!STF_WINDOWSSYSPATH)\driversendififstr(i) $(DoCopy) == "YES"debug-output "copy files in copy list."set !STF_NCPA_FLUSH_COPYLIST = TRUECopyFilesInCopyListendifexit;*******************************************************************************; Description:;; Input:; None.;; Output:; $($R0): STATUS: STATUS_SUCCESSFUL; $($R1): Option Type (COMPUTER ...); $($R2): Diskette description;*******************************************************************************[Identify]read-syms DebugControldebug-output "### Identify"read-syms Identificationset Status = STATUS_SUCCESSFULset Identifier = $(OptionType)set Media = #("Source Media Descriptions", 1, 1)return $(Status) $(Identifier) $(Media);*******************************************************************************; Description:;; Input:; $($0): Language used. (ENG|FRN|...);; Output:; $($R0): STATUS: STATUS_SUCCESSFUL; STATUS_NOLANGUAGE; STATUS_FAILED; STATUS_NOTSUPPORTED;; $($R1): Option List; $($R2): Option Text List;*******************************************************************************[ReturnOptions]read-syms DebugControldebug-output "### ReturnOptions"set OptionList = {}set OptionTextList = {}set LanguageList = ^(LanguagesSupported, 1)ifcontains(i) $($0) in $(LanguageList)set Status = STATUS_SUCCESSFULset OptionList = ^(Options, 1)set OptionTextList = ^(OptionsText$($0), 1)ifstr(i) $($1) != ""set PlatformList = ^(PlatformsSupported, 1)ifcontains(i) $($1) not-in $(PlatformList)debug-output "Unknown platform: "$($1)set Status = STATUS_NOLANGUAGEendifendifelsedebug-output "Language not supported."set Status = STATUS_NOLANGUAGEendifreturn $(Status) $(OptionList) $(OptionTextList);*******************************************************************************; Description:; This section performs the following tasks:; Copy files representing Options.; Configure the installed option.; Update the registry for the installed option;; Input:; $($0): Language to use; $($1): OptionID to install; $($2): SourceDirectory; $($3): AddCopy (YES | NO); $($4): DoCopy (YES | NO); $($5): DoConfig (YES | NO);; Output:; $($R0): STATUS: STATUS_SUCCESSFUL |; STATUS_NOLANGUAGE |; STATUS_USERCANCEL |; STATUS_FAILED;*******************************************************************************[InstallOption]read-syms DebugControldebug-output "### InstallOption"Set LanguageList = ^(LanguagesSupported, 1)ifcontains(i) $($0) not-in $(LanguageList)return STATUS_NOLANGUAGEendifset OptionId = $($1)set SrcDir = $($2)read-syms FileConstants$(!STF_LANGUAGE)read-syms FileConstantsset-title $(Function$(OptionId)Title)ifstr(i) $(!NTN_InstallMode) == Deinstallshell "" RemoveSection $(OptionId)else-ifstr(i) $(!NTN_InstallMode) == Updateshell "" UpdateSection $(OptionId) $(SrcDir)else-ifstr(i) $(!NTN_InstallMode) == Bindshell "" BindSection $(OptionId)else-ifstr(i) $(!NTN_InstallMode) == Configureshell "" ConfigureSection $(OptionId)elsestartwaitshell "" InstallSection $($1) $($2) $($3) $($4) $($5)endwaitifstr(i) $($R0) != STATUS_SUCCESSFULshell "" RemoveSectionreturn STATUS_FAILEDendifendifdebug-output "Final status: "$($R0)return $($R0);*******************************************************************************; Description:;; Input:; $($0): OptionId;; Output:; $($R0) Status;*******************************************************************************[RemoveSection]read-syms DebugControldebug-output "### RemoveSection"set OptionId = $($0)read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)ifstr(i) $(MiniportProductKeyName) == $(!NTN_RegBase)debug-output "Removing software component."shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +$(MiniportProductName)elsedebug-output "Removing hardware component."shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +$(MiniportProductName), $(!NTN_RegBase)endifreturn STATUS_SUCCESSFUL;*******************************************************************************; Description:;; Input:; $($0): OptionId; $($1): SourceDirectory;; Output:; $($R0) Status;*******************************************************************************[UpdateSection]read-syms DebugControldebug-output "### UpdateSection"set OptionId = $($0)set SrcDir = $($1)read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)openregkey $(!REG_H_LOCAL) "" $(MiniportProductKeyName) $(MAXIMUM_ALLOWED) +ProductKeyifstr $(ProductKey) == ""debug-output "Cannot get registry key."shell "" ShowErrorMessage "FATAL" $(MsgRegistryKeyDoesNotExist)return STATUS_FAILEDendifgetregvalue $(ProductKey), "MajorVersion", VersionInfoset MajorVersion = *($(VersionInfo), 4)debug-output "Major version: "$(MajorVersion)getregvalue $(ProductKey), "MinorVersion", VersionInfoset MinorVersion = *($(VersionInfo), 4)debug-output "Minor version: "$(MinorVersion)set-mul OldVersion = $(MajorVersion), 1000set-add OldVersion = $(OldVersion), $(MinorVersion)set-mul NewVersion = $(ProductMajorVersion), 1000set-add NewVersion = $(NewVersion), $(ProductMinorVersion)ifint $(OldVersion) > $(NewVersion)debug-output "Oldversion: "$(OldVersion)", NewVersion: "$(NewVersion)shell "" ShowErrorMessage "FATAL" $(MsgDowngrade)return STATUS_USERCANCELendifinstall "Install-Update"setregvalue $(ProductKey) { MajorVersion, $(NoTitle), $(!REG_VT_SZ), +$(ProductMajorVersion) }setregvalue $(ProductKey) { MinorVersion, $(NoTitle), $(!REG_VT_SZ), +$(ProductMinorVersion) }closeregkey $(ProductKey); Enumerate all netcards installed of this type and update themset iSearch = 1 ; start of search.nextnetcard = +shell $(UtilityInf), FindNextNetworkCard, $(MiniportProductName), +$(iSearch)set KeyNetcard = $($R0)set iSearch = $($R1) ; next network card.ifstr $(KeyNetcard) != $(KeyNull); Get the service name so we can get the device location on the bus.getregvalue $(KeyNetcard), "ServiceName", ServiceNameInfoset ServiceName = *($(ServiceNameInfo), 4)debug-output "ServiceName: "$(ServiceName); get the bus, device, and function number before calling; "Install-ChangeDefaults".openregkey $(!REG_H_LOCAL) "" $(ServiceKeyName)"\"$(ServiceName)"\"+"Parameters" $(MAXIMUM_ALLOWED) ParameterKeygetregvalue $(ParameterKey), "BusNumber", ValueInfoset BusNum = *($(ValueInfo), 4)getregvalue $(ParameterKey), "SlotNumber", ValueInfoset DeviceNum = *($(ValueInfo), 4)getregvalue $(ParameterKey), "FunctionNumber", ValueInfoset FunctionNum = *($(ValueInfo), 4)debug-output "bus: "$(BusNum)" Dev: "$(DeviceNum)" Funct: "+$(FunctionNum)install "Install-ChangeDefaults"; Change the description.setregvalue $(KeyNetcard) { Description, $(NoTitle), +$(!REG_VT_SZ), $(Miniport$(OptionId)Description) }closeregkey $(KeyNetcard); Set BCMDID = 0x14e40000 + device IDset-hextodec BCMDID = $(DevID)debug-output "UpdateSection DevID: "$(DevID)" BCMDID: "$(BCMDID)set-add BCMDID = 350486528, $(BCMDID)debug-output "UpdateSection BCMDID: "$(BCMDID)setregvalue $(ParameterKey) { BCMDID, $(NoTitle), +$(!REG_VT_DWORD), $(BCMDID) }closeregkey $(ParameterKey)goto nextnetcardEndif; shell "" ShowErrorMessage "NONFATAL" $(MsgUpdateDone)return STATUS_SUCCESSFUL;*******************************************************************************; Description:;; Input:; $($0): OptionId;; Output:; $($R0) Status;*******************************************************************************[BindSection]read-syms DebugControldebug-output "### BindSection"set OptionId = $($0)return STATUS_SUCCESSFUL;*******************************************************************************; Description:;; Input:; None;; Output:; None;*******************************************************************************[Install-OTHER]set STF_VITAL = ""set STF_OVERWRITE = "ALWAYS"AddSectionFilesToCopyList Files-Other $(SrcDir) $(!STF_WINDOWSSYSPATH)set !STF_NCPA_FLUSH_COPYLIST = TRUECopyFilesInCopyListExit;*******************************************************************************; Description:;; Input:; None;; Output:; None;*******************************************************************************[Install-ChangeDefaults]debug-output "### Install-ChangeDefaults"; BusNum, DeviceNum, and FunctionNum must be initialized before calling; this section.; Load B57dtect dll so we can read PCI configuration registers mainly to; get the PCI IDs.LoadLibrary $(MsgCannotFindB57dtectDll) $(!STF_WINDOWSSYSPATH)"\"+$(B57dtectDll) HwdtectDll; Get device ID.LibraryProcedure DevID $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x02"debug-output "DevID: "$(DevID); Get subvendor ID.LibraryProcedure SVID $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2c"debug-output "SVID: "$(SVID); Get the subsystem id.LibraryProcedure SSID $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2e"debug-output "SSID: "$(SSID)FreeLibrary $(HwdtectDll)set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet "+"NDIS 4.0 Driver Version "$(ProductVersion)"."ifstr(i) $(DevID) == "0x164d"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Fast Ethernet"set MiniportB57NT4Description = "Broadcom NetXtreme Fast Ethernet "+"NDIS 4.0 Driver Version "$(ProductVersion)"."endififstr(i) $(DevID) == "0x166e"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Fast Ethernet"set MiniportB57NT4Description = "Broadcom NetXtreme Fast Ethernet "+"NDIS 4.0 Driver Version "$(ProductVersion)"."endif; Change the title and description.ifstr(i) $(SVID) == "0x14e4"ifstr(i) $(SSID) == "0x16a8"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Fiber"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Fiber "+"NDIS 4.0 Driver Version "$(ProductVersion)"."set ConnectionList = { "Auto", "1 Gb Full" }set ConnectionValueList = { 0, 12 }endififstr(i) $(SSID) == "0x0002"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Fiber"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Fiber "+"NDIS 4.0 Driver Version "$(ProductVersion)"."set ConnectionList = { "Auto", "1 Gb Full" }set ConnectionValueList = { 0, 12 }endififstr(i) $(SSID) == "0x000a"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Fiber"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Fiber "+"NDIS 4.0 Driver Version "$(ProductVersion)"."set ConnectionList = { "Auto", "1 Gb Full" }set ConnectionValueList = { 0, 12 }endififstr(i) $(SSID) == "0x0003"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Fiber"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Fiber "+"NDIS 4.0 Driver Version "$(ProductVersion)"."set ConnectionList = { "Auto", "1 Gb Full" }set ConnectionValueList = { 0, 12 }endififstr(i) $(SSID) == "0x0007"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Fiber"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Fiber "+"NDIS 4.0 Driver Version "$(ProductVersion)"."set ConnectionList = { "Auto", "1 Gb Full" }set ConnectionValueList = { 0, 12 }endifendififstr(i) $(SVID) == "0x103c"ifstr(i) $(SSID) == "0x12bb"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet for hp"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet for hp."endififstr(i) $(SSID) == "0x12bc"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet for hp"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet for hp."endififstr(i) $(SSID) == "0x000c"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet for hp"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet for hp."endififstr(i) $(SSID) == "0x12bf"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet for hp"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet for hp."endififstr(i) $(SSID) == "0x3000"set MiniportB57NT4HardwareTitle = "Broadcom NetXtreme Gigabit Ethernet for hp"set MiniportB57NT4Description = "Broadcom NetXtreme Gigabit Ethernet for hp."endifendifExit;*******************************************************************************; Description:;; Input:; $($0): OptionId;; Output:; $($R0) STATUS_FAILED or STATUS_SUCCESSFUL;*******************************************************************************[ConfigureSection]read-syms DebugControldebug-output "### ConfigureSection"set OptionId = $($0)read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)openregkey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) ProductKeyifstr $(ProductKey) == ""debug-output "Component not installed."shell "" ShowRegistryErrorMessage "FATAL" CANNOT_FIND_COMPONENT_SERVICEreturn STATUS_FAILEDEndifshell $(UtilityInf) FindService $(ProductKey)ifstr(i) $($R0) != NO_ERRORdebug-output "Canot not find the component."closeregkey $(ProductKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifcloseregkey $($R1)closeregkey $(ProductKey)set ParameterKey = $($R2)ifstr $(ParameterKey) == ""shell "" ShowRegistryErrorMessage "FATAL" CANNOT_FIND_COMPONENT_SERVICEreturn STATUS_FAILEDendifEnumRegValue $(ParameterKey) ValueListset ConnectionIndex = 0set FlowControlCapIndex = 0set RxMtuIndex = 1500ForListDo $(ValueList)set ValueItem = $($)set ValueName = *($(ValueItem), 1)set ValueData = *($(ValueItem), 4)ifstr(i) $(ValueName) == "RequestedMediaType"set ConnectionIndex = $(ValueData)endififstr(i) $(ValueName) == "FlowControlCap"set FlowControlCapIndex = $(ValueData)endififstr(i) $(ValueName) == "RxMtu"set RxMtuIndex = $(ValueData)endififstr(i) $(ValueName) == "BusNumber"set BusNum = $(ValueData)endififstr(i) $(ValueName) == "SlotNumber"set DeviceNum = $(ValueData)endififstr(i) $(ValueName) == "FunctionNumber"set FunctionNum = $(ValueData)endifEndForListDoset OldConnectionValue = $(ConnectionIndex)set OldFlowControlCapValue = $(FlowControlCapIndex)set OldRxMtuValue = $(RxMtuIndex)set ConnectionList = ^(RequestedMediaType$(OptionId), 1)set ConnectionValueList = ^(RequestedMediaType$(OptionId), 2)debug-output "ConnectionList: "$(ConnectionList)debug-output "ConnectionValueList: "$(ConnectionValueList)set FlowControlCapList = ^(FlowControlCap$(OptionId), 1)set FlowControlCapValueList = ^(FlowControlCap$(OptionId), 2)debug-output "FlowControlCapList: "$(FlowControlCapList)debug-output "FlowControlCapValueList: "$(FlowControlCapValueList)set RxMtuList = ^(RxMtu$(OptionId), 1)set RxMtuValueList = ^(RxMtu$(OptionId), 2)debug-output "RxMtuList: "$(RxMtuList)debug-output "RxMtuValueList: "$(RxMtuValueList); Get the bus, device, and function number are initialized above.install "Install-ChangeDefaults"debug-output "New connection list: "$(ConnectionList)debug-output "New connection value list: "$(ConnectionValueList)set ConnectionValue = *($(ConnectionList), ~($(ConnectionValueList), +$(ConnectionIndex)))ifstr(i) $(ConnectionValue) == ""set ConnectionValue = *($(ConnectionList), 1)endifset FlowControlCapValue = *($(FlowControlCapList), ~($(FlowControlCapValueList), +$(FlowControlCapIndex)))ifstr(i) $(FlowControlCapValue) == ""set FlowControlCapValue = *($(FlowControlCapList), 1)endifset RxMtuValue = *($(RxMtuList), ~($(RxMtuValueList), $(RxMtuIndex)))ifstr(i) $(RxMtuValue) == ""set RxMtuValue = *($(RxMtuList), 1)endifread-syms DialogConstants$(!STF_LANGUAGE)ifstr(i) $(DevID) == "0x1653"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x1654"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x165d"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x165e"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x1677"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x166e"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x1696"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x169c"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x169d"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x170d"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x170e"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x1600"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)else-ifstr(i) $(DevID) == "0x17f7"read-syms RequestedMediaTypeADlg$(!STF_LANGUAGE)elseread-syms RequestedMediaTypeDlg$(!STF_LANGUAGE)endifdebug-output "HelpContext = "$(HelpContext)sethelpfile $(!STF_WINDOWSSYSPATH)"\"$($(OptionId)HelpFile) +$(MinHelpId) $(MaxHelpId) $($(OptionId)HelpId)set ConnectionIndex = *($(ConnectionList), 1)set FlowControlCapIndex = *($(FlowControlCapList), 1)set RxMtuIndex = *($(RxMtuList), 1)set RetStatus = STATUS_SUCCESSFULui start "Config"ifstr(i) $(DLGEVENT) == "CONTINUE"set ConnectionIndex = $(Combo1Out)set FlowControlCapIndex = $(Combo2Out)set RxMtuIndex = $(Combo3Out)else-ifstr(i) $(DLGEVENT) == "BACK"set RetStatus = STATUS_USERCANCELendifui pop 1set NewConnectionValue = *($(ConnectionValueList), +~($(ConnectionList), $(ConnectionIndex)))set NewFlowControlCapValue = *($(FlowControlCapValueList), +~($(FlowControlCapList), $(FlowControlCapIndex)))ifstr(i) $(DevID) == "0x1653"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x1654"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x165d"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x165e"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x166e"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x1677"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x1696"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x169c"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x169d"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x170d"set NewRxMtuValue = 1500else-ifstr(i) $(DevID) == "0x170e"set NewRxMtuValue = 1500elseset NewRxMtuValue = *($(RxMtuValueList), +~($(RxMtuList), $(RxMtuIndex)))endifdebug-output "New Connection value = "$(NewConnectionValue)debug-output "Old Connection value = "$(OldConnectionValue)debug-output "New FlowControlCap value = "$(NewFlowControlCapValue)debug-output "Old FlowControlCap value = "$(OldFlowControlCapValue)debug-output "New RxMtu value = "$(NewRxMtuValue)debug-output "Old RxMtu value = "$(OldRxMtuValue)ifstr(i) $(NewConnectionValue) == $(OldConnectionValue)ifstr(i) $(NewFlowControlCapValue) == $(OldFlowControlCapValue)ifstr(i) $(NewRxMtuValue) == $(OldRxMtuValue)set RetStatus = STATUS_USERCANCELendifendifendififstr(i) $(RetStatus) == "STATUS_SUCCESSFUL"set NewValueList = { +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), +$(NewConnectionValue)}, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), +$(NewFlowControlCapValue)}, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), +$(NewRxMtuValue)} }shell $(UtilityInf), AddValueList, $(ParameterKey), $(NewValueList)endifcloseregkey $(ParameterKey)return $(RetStatus);*******************************************************************************; Description:;; Input:; $($0): PciIdList;; Output:; $($R0) Adapter list.;*******************************************************************************[BuildAdapterList]read-syms DebugControlread-syms FileConstantsdebug-output "### BuildAdapterList"set PciIdList = $($0)debug-output "PciIdList: "$(PciIdList); Load B57dtect dll so we can get the PCI sub vendor id.LoadLibrary $(MsgCannotFindB57dtectDll) $(!STF_WINDOWSSYSPATH)"\"+$(B57dtectDll) HwdtectDllset AllAdapterList = {}forlistdo $(PciIdList)set VID = *($($), 1)set DID = *($($), 2)debug-output "VID: "$(VID)" DID: "$(DID)shell $(UtilityInf), GetPCIInformation, $(VID) $(DID)ifint $($ShellCode) == $(!SHELL_CODE_OK)set AdapterList = $($R0)debug-output "AdapterList: "$(AdapterList)forlistdo $(AdapterList)set Adapter = $($)set BusNum = *($(Adapter), 1)set DeviceNum = *($(Adapter), 2)set FunctionNum = *($(Adapter), 3)ifint $(FunctionNum) == 1; GHL It just so happens that the second function is at; device + 32 to make nt4 happyset-add DeviceNum = $(DeviceNum),32set Adapter = { $(BusNum), $(DeviceNum), $(FunctionNum) }endif; Get subvendor ID.LibraryProcedure SVID $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2c"debug-output "SVID: "$(SVID); Get the subsystem id.LibraryProcedure SSID $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2e"debug-output "SSID: "$(SSID)set AllAdapterList = >($(AllAdapterList), $(Adapter))endforlistdoendifendforlistdoFreeLibrary $(HwdtectDll)debug-output "AllAdapterList: "$(AllAdapterList)return $(AllAdapterList);*******************************************************************************; Description:;; Input:; None.;; Output:; $($R0) STATUS_FAILED or STATUS_SUCCESSFUL;*******************************************************************************[CheckServicePack]read-syms DebugControldebug-output "### CheckServicePack"read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"return STATUS_SUCCESSFULendif; Load B57dtect.dll so we can get the service pack info.LoadLibrary $(MsgCannotFindB57dtectDll) $(!STF_WINDOWSSYSPATH)"\"+$(B57dtectDll) HwdtectDllLibraryProcedure OsVersionInfo $(HwdtectDll) B57GetOsVersiondebug-output "OsVersionInfo: "$(OsVersionInfo)FreeLibrary $(HwdtectDll)split-string $(OsVersionInfo) "," OsVersionInfoListdebug-output "OsVersionInfoList: "$(OsVersionInfoList)set ServicePack = *($(OsVersionInfoList), 9)debug-output "Service Pack: "$(ServicePack)set UnsupportedServicePacks = { "Service Pack 0", "Service Pack 1", +"Service Pack 2", "Service Pack 3" }ifcontains(i) $(ServicePack) in $(UnsupportedServicePacks)set DlgType = "MessageBox"set STF_MB_TITLE = $(MessageBoxTitle)set STF_MB_TEXT = $(MsgUntestedServicePack)set STF_MB_TYPE = 3 ; YES or NO buttons.set STF_MB_ICON = 2 ; Info icon.set STF_MB_DEF = 1 ; Default button YES.ui start "Message"ifstr(i) $(DLGEVENT) == "YES"debug-output "Continue with installation."set RetStatus = STATUS_SUCCESSFULelsedebug-output "Quit installation."set RetStatus = STATUS_FAILEDendifelsedebug-output "Supported service pack."set RetStatus = STATUS_SUCCESSFULendifreturn $(RetStatus);*******************************************************************************; Description:; Determine if the driver has been installed for a network card get the; give bus and slot number.;; Input:; $($0): Bus number.; $($1): Slot number.;; Output:; $($R0): STATUS_FAILED or STATUS_SUCCESSFUL.; $($R1): "NO" or "YES";*******************************************************************************[IsDriverAlreadyInstalled]read-syms DebugControldebug-output "### IsDriverAlreadyInstalled"read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)set BusNum = $($0)set SlotNum = $($1)set FunctionNum = $($2); Open the NetworkCards registry hive.OpenRegKey $(!REG_H_LOCAL) "" $(NetworkCardKeyName) $(MAXIMUM_ALLOWED) +IE_KeyNetcardsIfstr $(IE_KeyNetcards) == ""debug-output "Unable to open registry key: "$(NetworkCardKeyName)shell "" ShowRegistryErrorMessage "FATAL" +UNABLE_OPEN_NETWORKCARD_SECTIONreturn STATUS_FAILEDendif; Get a list of installed network cards.EnumRegKey $(IE_KeyNetcards) IE_KeyNameList; Compare the product name, bus number, and slot number. If all the; the comparisions matched, then the driver was installed for this adapter.ForListDo $(IE_KeyNameList)set IE_KeyName = *($($),1); Open the key that contains the driver information.OpenRegKey $(IE_KeyNetcards) "" $(IE_KeyName) $(MAXIMUM_ALLOWED) IE_CardIfstr $(IE_Card) == ""debug-output "Unable to open the adapter instance key."shell "" ShowRegistryErrorMessage "FATAL" +UNABLE_OPEN_NETWORKCARD_SECTIONreturn STATUS_FAILEDendif; Get the product name.GetRegValue $(IE_Card), "ProductName", ProductNameInfoset CardProductName = *($(ProductNameInfo), 4)debug-output "Found product name: "$(CardProductName)ifcontains(i) $(CardProductName) in { B57NT4, Q57NT4 }; Get the service name so we can get the bus and slot number later.GetRegValue $(IE_Card), "ServiceName", ServiceNameInfoset ServiceName = *($(ServiceNameInfo), 4)debug-output "Found service name: "$(ServiceName); Open the driver parameter key to get the bus and slot number.OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName)"\"$(ServiceName)+"\Parameters" $(MAXIMUM_ALLOWED) IE_KeyServiceIfstr $(IE_KeyService) == ""debug-output "Unable to open service key."shell "" ShowRegistryErrorMessage "FATAL" +UNABLE_OPEN_NETWORKCARD_SECTIONreturn STATUS_FAILEDendifGetRegValue $(IE_KeyService), "BusNumber", BusInfoGetRegValue $(IE_KeyService), "SlotNumber", SlotInfoGetRegValue $(IE_KeyService), "FunctionNumber", FunctionInfoset CardBusNum = *($(BusInfo), 4)set CardSlotNum = *($(SlotInfo), 4)set CardFunctionNum = *($(FunctionInfo), 4)ifint $(CardBusNum) == $(BusNum)ifint $(CardSlotNum) == $(SlotNum)ifint $(CardFunctionNum) == $(FunctionNum)debug-output "Adapter already installed"return STATUS_SUCCESSFUL "YES"endifendifendifendifEndForListDodebug-output "Adapter not previously installed"return STATUS_SUCCESSFUL "NO";*******************************************************************************; Description:;; Input:; $($0): OptionId; $($1): SourceDirectory; $($2): AddCopy (YES | NO); $($3): DoCopy (YES | NO); $($4): DoConfig (YES | NO);; Output:; $($R0) STATUS_FAILED or STATUS_SUCCESSFUL;*******************************************************************************[InstallSection]read-syms DebugControldebug-output "### InstallSection"set OptionId = $($0)set SrcDir = $($1)set AddCopy = $($2)set DoCopy = $($3)set DoConfig = $($4)read-syms FileConstantsread-syms FileConstants$(!STF_LANGUAGE)detect CurrentDate; Get installation source directory.ifstr(i) $(DoCopy) == "YES"debug-output "DoCopy"shell $(UtilityInf) DoAskSource $(!STF_CWDDIR) $(SrcDir) YESifint $($ShellCode) != $(!SHELL_CODE_OK)shell "" ShowShellErrorMessagereturn STATUS_FAILEDelse-ifstr(i) $($R0) == STATUS_FAILEDshell "" ShowRegistryErrorMessage "FATAL" ASK_SOURCE_FAILreturn STATUS_FAILEDelse-ifstr(i) $($R0) == STATUS_USERCANCELdebug-output "User cancelled."return STATUS_USERCANCELendifset SrcDir = $($R1)endifinstall "Install-Help"install "Install-OTHER"install "Install-Option"; First time installation -- we need to install the software component.openregkey $(!REG_H_LOCAL) "" $(MiniportProductKeyName) $(MAXIMUM_ALLOWED) +ProductKeyifstr $(ProductKey) == ""debug-output "First time installation"ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESSdebug-output "Copy file failed."shell "" ShowRegistryErrorMessage "FATAL" UNABLE_COPY_FILEreturn STATUS_FAILEDendifdebug-output "Create the software component."shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +$(MiniportProductName), $(MiniportProductName), +$(MiniportProductSoftwareDisplayName), $(STF_CONTEXTINFNAME), +$(ProductSoftwareImagePath), "kernel", "NDIS", {}, "", +$(NetEventDll)ifstr(i) $($R0) != NO_ERRORdebug-output "Add miniport software component failed."closeregkey $($R1)closeregkey $($R2)closeregkey $($R3)closeregkey $($R4)closeregkey $($R5)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendif; $R1 contains handle to "SOFTWARE\[Manufacturer]\CurrentVersion".; $R2 contains handle to "SOFTWARE\[Manufacturer]\CurrentVersion\NetRules".; $R3 contains handle to "SYSTEM\CurrentControlSet\[Service]".; $R4 contains handle to "SYSTEM\CurrentControlSet\[Service]\Parameters".; $R5 contains handle to "SYSTEM\CurrentControlSet\[Service]\Linkage".set ProductKey = $($R1)set NetRuleKey = $($R2)set ServiceKey = $($R3)set ParameterKey = $($R4)set LinkageKey = $($R5)set NewValueList = { +{ SoftwareType, $(NoTitle), $(!REG_VT_SZ), +$(MiniportSoftwareType) }, +{ MajorVersion, $(NoTitle), $(!REG_VT_DWORD), +$(ProductMajorVersion) }, +{ MinorVersion, $(NoTitle), $(!REG_VT_DWORD), +$(ProductMinorVersion) }, +{ Title, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductSoftwareTitle) }, +{ Description, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductDescription) }, +{ ServiceName, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductName) }, +{ InstallDate, $(NoTitle), $(!REG_VT_DWORD), +*($(Now),1) } }shell $(UtilityInf), AddValueList, $(ProductKey), $(NewValueList)ifstr(i) $($R0) != NO_ERRORdebug-output "Cannot create miniport software key."closeregkey $(ProductKey)closeregkey $(NetRuleKey)closeregkey $(ServiceKey)closeregkey $(ParameterKey)closeregkey $(LinkageKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifset NewValueList = { +{ type, $(NoTitle), $(!REG_VT_SZ), +$(MiniportNetRuleSoftwareType) }, +{ use, $(NoTitle), $(!REG_VT_SZ), +$(MiniportNetRuleSoftwareUse) }, +{ bindform, $(NoTitle), $(!REG_VT_SZ), +$(MiniportNetRuleSoftwareBindForm) }, +{ class, $(NoTitle), $(!REG_VT_MULTI_SZ), +$(MiniportNetRuleSoftwareClass) }, +{ bindable, $(NoTitle), $(!REG_VT_MULTI_SZ), +$(MiniportNetRuleSoftwareBindable) }, +{ InfOption, $(NoTitle), $(!REG_VT_SZ), $(OptionId) } }shell $(UtilityInf), AddValueList, $(NetRuleKey), $(NewValueList)ifstr(i) $($R0) != NO_ERRORdebug-output "### Cannot create the miniport netrules."closeregkey $(ProductKey)closeregkey $(NetRuleKey)closeregkey $(ServiceKey)closeregkey $(ParameterKey)closeregkey $(LinkageKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifcloseregkey $(NetRuleKey)closeregkey $(ServiceKey)closeregkey $(ParameterKey)closeregkey $(LinkageKey)endifcloseregkey $(ProductKey); Check OS version. - Disabled for now.;shell "" CheckServicePack;ifstr(i) $($R0) != STATUS_SUCCESSFUL; return STATUS_USERCANCEL;endif; Get the adapter list.set PciIdList = { { 5348, 5700 }, { 5348, 5701 }, { 5348, 5702 }, { 5348, 5798 }, { 5348, 5709 }, { 5348, 5703 }, { 5348, 5799 }, { 5348, 5704 } , { 5348, 5725 } , { 5348, 5726 } , { 5348, 5715 } , { 5348, 5716 } , { 5348, 5901 } , { 5348, 5830 } , { 5348, 5831} , { 5348, 5782 } , { 5348 , 5800}, { 5348 , 5788 } , { 5348 , 5789 } , { 5348 , 5742 } , { 5348, 5751 } , { 5348, 5755 } }shell "" BuildAdapterList $(PciIdList)set AdapterList = $($R0)ifstr(i) $(AdapterList) == {}shell "" ShowErrorMessage "NONFATAL" $(MsgNoAdapterFound)return STATUS_FAILEDendif; Load B57dtect dll so we can get the PCI sub vendor id.LoadLibrary $(MsgCannotFindB57dtectDll) $(!STF_WINDOWSSYSPATH)"\"+$(B57dtectDll) HwdtectDll; HotPlug PCI port number. This number is only valid for 5701 device; with 0x0e110085 subsystem id.set HppPortNum = 0debug-output "======== Install adapters: "$(AdapterList)forlistdo $(AdapterList)debug-output "***** Installing adapter "$($)"."set BusNum = *($($), 1)set DeviceNum = *($($), 2)set FunctionNum = *($($), 3); Change the default parameters according to the subsystem id.install "Install-ChangeDefaults"shell "" IsDriverAlreadyInstalled $(BusNum) $(DeviceNum) $(FunctionNum)ifstr $($R0) != STATUS_SUCCESSFULreturn STATUS_FAILEDendififstr(i) $($R1) != "YES"debug-output "add hardware component."shell $(UtilityInf), AddHardwareComponent, $(MiniportProductName), +$(STF_CONTEXTINFNAME), $(MiniportProductKeyName)ifstr(i) $($R0) != NO_ERRORdebug-output "### Add hardware component error."closeregkey $($R1)closeregkey $($R2)closeregkey $($R3)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifset HardNetCardKey = $($R1)set HardNetRuleKey = $($R2)set HardParameterKey = $($R3)set AdapterNumber = $($R4)set NewValueList = { +{ Manufacturer, $(NoTitle), $(!REG_VT_SZ), $(Manufacturer) }, +{ Title, $(NoTitle), $(!REG_VT_SZ), +"["$($R4)"] "$(Miniport$(OptionId)HardwareTitle)" "+"(Bus "$(BusNum)", Slot "$(DeviceNum)")." }, +{ Description, $(NoTitle), $(!REG_VT_SZ), +$(Miniport$(OptionId)Description) }, +{ ProductName, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductName) }, +{ ServiceName, $(NoTitle), $(!REG_VT_SZ), $($R5) }, +{ InstallDate, $(NoTitle), $(!REG_VT_DWORD), *($(Now), 1) } }shell $(UtilityInf), AddValueList, $(HardNetCardKey), +$(NewValueList)ifstr(i) $($R0) != NO_ERRORcloseregkey $(HardNetCardKey)closeregkey $(HardNetRuleKey)closeregkey $(HardParameterKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifset DeviceId = ""LibraryProcedure DeviceId $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x02"debug-output "Device Id: "$(DeviceId); Get subvendor ID.LibraryProcedure SubVenId $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2c"debug-output "Subvendor Id: "$(SubVenId); Get the subsystem id.LibraryProcedure SubSysId $(HwdtectDll) B57dtectPortIo "PciRd16" +$(BusNum) $(DeviceNum) $(FunctionNum) "0x2e"debug-output "Subsystem Id: "$(SubSysId); Increment the Hpp port number.ifstr(i) $(DeviceId) == "0x1645"ifstr(i) $(SubVenId) == "0x0e11"ifstr(i) $(SubSysId) == "0x0085"set-add HppPortNum = $(HppPortNum), 1endifendifendif; Set BCMDID = 0x14e40000 + device IDset-hextodec BCMDID = $(DeviceId)debug-output "UpdateSection BCMDID: "$(BCMDID)set-add BCMDID = 350486528, $(BCMDID)debug-output "UpdateSection BCMDID: "$(BCMDID)ifstr(i) $(DeviceId) == "0x1645"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ HppPortNum, $(NoTitle), $(!REG_VT_DWORD), $(HppPortNum) } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x1646"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x164d"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x16a6"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x1647"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x16a7"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x1648"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }else-ifstr(i) $(DeviceId) == "0x170D"set NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 10 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 30 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }elseset NewValueList = { +{ BCMDID, $(NoTitle), $(!REG_VT_DWORD), $(BCMDID) }, +{ BusType, $(NoTitle), $(!REG_VT_DWORD), 5 }, +{ BusNumber, $(NoTitle), $(!REG_VT_DWORD), $(BusNum) }, +{ SlotNumber, $(NoTitle), $(!REG_VT_DWORD), $(DeviceNum) }, +{ FunctionNumber, $(NoTitle), $(!REG_VT_DWORD), $(FunctionNum) }, +{ MediaType, $(NoTitle), $(!REG_VT_DWORD), 1 }, +{ TxPacketDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxStdDescCnt, $(NoTitle), $(!REG_VT_DWORD), 200 }, +{ RxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 360 }, +{ TxCoalescingTicks, $(NoTitle), $(!REG_VT_DWORD), 360 }, +{ RxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 15 }, +{ TxMaxCoalescedFrames, $(NoTitle), $(!REG_VT_DWORD), 75 }, +{ FlowControlCap, $(NoTitle), $(!REG_VT_DWORD), 0 }, +{ RxMtu, $(NoTitle), $(!REG_VT_DWORD), 1500} +{ WireSpeed, $(NoTitle), $(!REG_VT_DWORD), 1 } +{ RequestedMediaType, $(NoTitle), $(!REG_VT_DWORD), 0 } }endifdebug-output "Write driver params."shell $(UtilityInf), AddValueList, $(HardParameterKey), +$(NewValueList)ifstr(i) $($R0) != NO_ERRORdebug-output "### Add parameter shell error."closeregkey $(HardNetCardKey)closeregkey $(HardNetRuleKey)closeregkey $(HardParameterKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifset TempProdName = """"$(MiniportProductName)$(AdapterNumber)""""set TempBindForm = $(TempProdName)$(MiniportNetRuleHardwareBindForm)debug-output "updating netrules."set NewValueList = { +{ type, $(NoTitle), $(!REG_VT_SZ), +$(MiniportNetRuleHardwareType) }, +{ bindform, $(NoTitle), $(!REG_VT_SZ), $(TempBindForm) }, +{ class, $(NoTitle), $(!REG_VT_MULTI_SZ), +$(MiniportNetRuleHardwareClass) }, +{ InfOption, $(NoTitle), $(!REG_VT_SZ), $(OptionId)} }shell $(UtilityInf), AddValueList, $(HardNetRuleKey), +$(NewValueList)ifstr(i) $($R0) != NO_ERRORdebug-output "### Add hardware component error."closeregkey $(HardNetCardKey)closeregkey $(HardNetRuleKey)closeregkey $(HardParameterKey)shell "" ShowRegistryErrorMessage "FATAL" $($R0)return STATUS_FAILEDendifcloseregkey $(HardNetCardKey)closeregkey $(HardNetRuleKey)ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"Shell $(UtilityInf), AddDefaultNetCardParameters, +$(HardParameterKey)endifcloseregkey $(HardParameterKey)endifdebug-output ""endforlistdoFreeLibrary $(HwdtectDll); Create IBM hot plug PCI service key.createregkey $(!REG_H_LOCAL) { $(IBM_HPP_ServiceKey), $(NoTitle), +GenericClass } "" $(MAXIMUM_ALLOWED) "" HppKeyifstr(i) $(HppKey) != ""set NewValueList = { +{ DriverServices, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductName) }, +{ FriendlyName, $(NoTitle), $(!REG_VT_SZ), +$(MiniportProductSoftwareDisplayName) } }shell $(UtilityInf), AddValueList, $(HppKey), $(NewValueList)closeregkey $(HppKey)endif; Create Compaq hot plug PCI key.openregkey $(!REG_H_LOCAL) "" $(CPQ_HPP_Key) $(MAXIMUM_ALLOWED) HppKeyifstr $(HppKey) == ""createregkey $(!REG_H_LOCAL) { $(CPQ_HPP_Key), $(NoTitle), +GenericClass } "" $(MAXIMUM_ALLOWED) "" HppKeyset NewValueList = { +{ ClassID, $(NoTitle), $(!REG_VT_SZ), 0 }, +{ DLLName, $(NoTitle), $(!REG_VT_SZ), "CQRNICMN.DLL" } }shell $(UtilityInf), AddValueList, $(HppKey), $(NewValueList)endifcloseregkey $(HppKey)createregkey $(!REG_H_LOCAL) { $(CPQ_HPP_Key)"\"$(MiniportProductName), +$(NoTitle), GenericClass } "" $(MAXIMUM_ALLOWED) "" HppKeyset NewValueList = { +{ BaseOIDAddress, $(NoTitle), $(!REG_VT_DWORD), 4278322176 }, +{ SetOIDAddress, $(NoTitle), $(!REG_VT_DWORD), 4278321933 } }shell $(UtilityInf), AddValueList, $(HppKey), $(NewValueList)closeregkey $(HppKey)return STATUS_SUCCESSFUL