The thread IDs are important - even on UP machines - because all of this
runs at PASSIVE_LEVEL.
What bothers me is that NdisIMInitializeDeviceInstance is called after
ProtocolUnbindAdapter returns.
This statement does not make sense as you have written it. Of course it is
called *after* ProtocolUnbindAdapter() returns. It is called in the context
of the *next* ProtocolBindAdapter() invocation, right?
What is going on is that NDIS is binding your IM driver. Then, because your
IM driver is NDIS5, it is unbinding your IM driver because some other
component in the network stack has ‘paused’ the stack. Perhaps an LWF
driver is being inserted. Whatever. Since NDIS5 emulation in NDIS6 cannot
ask an NDIS5 Protocol to ‘pause’, it unbinds it while the remainder of the
stack below does whatever it is it is doing. When the stack is ‘resumed’,
the NDIS5 elements are bound back in.
Or something like that
The point being is that during boot up the sequence of bind operations
occurs in such a way that for this NIC, you get bound, unbound, and bound
again pretty quickly. You will probably note that if you disabled your IM
driver binding with BindView, booted the system, and then enabled the
binding for you IM driver, that you would only get one ProtocolBindAdapter()
and all would be wonderful in the world.
To simulate what happens at boot time without having all of the unimportant
things happening at boot time, try disabling the adapter. You can still
enable the ‘binding’ (installation of your IM driver) on the adapter even
though it is disabled. When you enable the adapter, NDIS will bring up the
bindings.
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@yahoo.com
Sent: Wednesday, March 25, 2009 6:22 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] NdisIMInitializeDeviceInstance fails with code
NDIS_STATUS_NOT_ACCEPTED
Hello and thank you for replying.
I did put traces in the driver. After NdisIMInitializeDeviceInstance fails,
no more MiniportInitialize / MiniportHalt calls are made. The system is
uni-processor, but I will add the thread information in the traces.
The rest of the application is not installed. My driver is running as a
PassThru clone.
What bothers me is that NdisIMInitializeDeviceInstance is called after
ProtocolUnbindAdapter returns. In MSDN is specified that
NDIS_STATUS_NOT_ACCEPTED means “NdisIMInitializeDeviceInstance failed
because the device specified by DriverHandle has already been initialized.”
So I haveno ideea why this is happening.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer