Unfinished network card enabling

Hi All,

Currently I’m struggling with the problems in Win2K in our packet-driver (NDIS Protocol driver,
which used to be based at NT DDK packet-driver). It seems I have fixed a lot of problems now I
inherited from the previous developer (losting of IRPs, incorrect request completing), and currently
the last problem I see following: while I’m able to disable successfully the underlying network card
via GUI or devcon (C:\xpddk\tools\>devcon -disable "@PCI\VEN_1022&DEV_2000&SUBSYS_00000000&REV_10\2&EBB567F&0&80"), but I’m unable to reenable it back
either using GUI or devcon(C:\xpddk\tools\>devcon -enable "@PCI\VEN_1022&DEV_2000&SUBSYS_00000000&REV_10\2&EBB567F&0&80"). It hangs for some reason.

Here is the DbgPrint results for the case of [successful] disabling the underlying adaptor (if it
will help):
ISPKTDRV: PacketPNPHandler
ISPKTDRV: PnPHandler - NetPnPEvent->NetEvent = NetEventQueryRemoveDevice (2)
ISPKTDRV: NetEventQueryRemoveDevice
ISPKTDRV: UnbindAdapter
ISPKTDRV: RemoveAdapter(): Closing adapterISPKTDRV: CloseAdapterComplete(), Status = 00000000,
Adapter = FDAE1EC0
ISPKTDRV_CloseAdapterComplete: Adapter removed
Flushing all ates fe409808
WMI: Invalid device object passed from user mode fe491858
WMI: Invalid device object passed from user mode fe491858
Nbt.NbtSetSmbBindingInfo: PnPOpCode=<2>, Bindings=<4>, BindMask=[1:0]==>[1:0]
Nbt.NbtSetSmbBindingInfo: PnPOpCode=<2>, Bindings=<4>, BindMask=[1:0]==>[1:0]
Nbt.NbtDestroyDevice: *** Destroying Device ***
\Device\NetBT_Tcpip_{3E36755F-B639-4B0E-BF35-9167903F7302}
MsgErrorLogWrite: COMPONENT = MESSENGER
Agent about to know that there is no net
MsgErrorLogWrite: An unexpected network control block (NCB) was received. The NCB is the data.
0x000FA72C 91 23 01 02 6C A7 ****** Unloaded driver (PCnet)
0F 00 00 00 2A 20 20 20 20 20 ‘#…l§…*
0x000FA73C 20 20 20 20 20 20 20 20 20 20 56 4D 54 49 4D 55 VMTIMU
0x000FA74C 52 32 4B 43 48 4B 20 20 20 03 3C 28 00 00 00 00 R2KCHK .<(…
0x000FA75C 00 23 00 00 00 00 00 00 31 00 00 00 C8 06 00 00 .#…1…È…
NCBADDR: 0xfa72c
Command: 0x91
RetCode: 0x23
LanaNum: 0x0
CmdCplt: 0x23
Name : VMTIMUR2KCHK <(
callNam: * VMTIMUR2KCHK <(
MsgErrorLogWrite: COMPONENT = MESSENGER
MsgErrorLogWrite: An unexpected network control block (NCB) was received. The NCB is the data.
0x000F901C 91 23 02 03 5C 90 0F 00 00 00 2A 20 20 20 20 20 ‘#…\…*
0x000F902C 20 20 20 20 20 20 20 20 20 20 41 44 4D 49 4E 49 ADMINI
0x000F903C 53 54 52 41 54 4F 52 20 20 03 3C 28 00 00 00 00 STRATOR .<(…
0x000F904C 00 23 00 00 00 00 00 00 31 00 00 00 C8 06 00 00 .#…1…È…
NCBADDR: 0xf901c
Command: 0x91
RetCode: 0x23
LanaNum: 0x0
CmdCplt: 0x23
Name : ADMINISTRATOR <(
callNam: * ADMINISTRATOR <(
616.780p> Cairole: Leaked 2020 bytes (23 allocations)
616.780p> heap: ***** 2020 bytes leaked mem for CDebugMalloc in ‘devcon -disable
@PCI\VEN_1022&DEV_2000&SUBSYS_00000000&REV_10\2&EBB567F&0&80”’
(s: 0 0x2a8.2d0 Explorer.EXE) USER-[Wrn=1400] HMValidateHandle: Invalid:0X00020090 Type:0x1
New PIIX/ICH Timing Register Value (IDETIM = 0xe307, SIDETIM (0x0), SDMACTL (0x1), SDMATIM (0x2),
IOCTRL (0x2f20)
New PIIX/ICH Timing Register Value (IDETIM = 0xe303, SIDETIM (0x0), SDMACTL (0x1), SDMATIM (0x0),
IOCTRL (0x2f20)

The messages prefixed by ISPKTDRV were mine.

And here the log I got after [unsuccessful] enable attempt:

NDIS: Init time (AMD PCNET Family PCI Ethernet Adapter) 9623 ms
ISPKTDRV: BindAdapter()
ISPKTDRV: AddAdapter() \DEVICE{3E36755F-B639-4B0E-BF35-9167903F7302}: New Adapter created
ISPKTDRV: AddAdapter(): KeWaitForSingleObject() returned 00000102 on wait for AdapterOpenComplete
ISPKTDRV: RequestComplete(): Status = 00000000: Adapter
OR: Set 00853220’s client appears to have died
OR: Set 008545C0’s client appears to have died
[Timur: Here I pressed Ctrl+C at the devcon window, so…]
448.856p> Cairole: Leaked 2020 bytes (23 allocations)
448.856p> heap: ***** 2020 bytes leaked mem for CDebugMalloc in ‘devcon -enable
@PCI\VEN_1022&DEV_2000&SUBSYS_00000000&REV_10\2&EBB567F&0&80”’
SETUPAPI.DLL: Leak (200 bytes) at D:\nt\private\windows\setup\setupapi\diutil.c line 230 (allocation
#18) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (28 bytes) at D:\nt\private\windows\setup\setupapi\strtab.c line 2067 (allocation
#19) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (6144 bytes) at D:\nt\private\windows\setup\setupapi\strtab.c line 2084
(allocation #20) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (64 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1416
(allocation #21) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (98 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1116
(allocation #22) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (44 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1352
(allocation #23) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (188 bytes) at D:\nt\private\windows\setup\setupapi\devinfo.c line 2252
(allocation #28) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (64 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1416
(allocation #29) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (98 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1116
(allocation #30) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (44 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1352
(allocation #31) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (40 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1603
(allocation #34) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (40 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 1613
(allocation #35) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (20 bytes) at D:\nt\private\windows\setup\setupapi\diutil.c line 2789 (allocation
#60) in process C:\xpddk\tools\devcon.exe
SETUPAPI.DLL: Leak (94 bytes) at D:\nt\private\windows\setup\setupapi\cntxtlog.c line 2403
(allocation #62) in process C:\xpddk\tools\devcon.exe

I believe I do (or don’t do) something obvious here. Do any of you experts have some advice for me?

Thanks in advance,
Timur Safin
InterSystems