If so , Why NDIS does not hook and handle all requests/Packets to Miniport ,
which are sent in the course of unbinding of Miniport driver with protocol ?
Actually, I still can receive requests in QueryInformation callback.
A miniport is not concerned (and should not be concerned) with whether or
not a protocol is bound to it. The miniport has a fixed set of rules to
obey irrespective of how many protocols (if any) are bound to it. Forget
about bindings in a miniport. They might as well not exist.
You get Miniport{Query|Set}Information() callbacks and you process them. It
does not matter if the miniport is bound or not. The miniport processes the
information request. That might mean it is ‘failed’ but that is still
processing it. Only the state of your NIC (device and possibly device
stack) effect how you process an NDIS_REQUEST. Where the request comes from
(NDIS or a Protocol) is irrelevant.
So , I can say that Miniport PnP handler is invoked prior to Unbound ,
Right ?
No, not particularly. Again I refer you to the above - in a Miniport,
bindings are irrelevant. Don’t worry about them.
If you care about a PnP notification and the state change of the Device
Stack implied by the callback causes some difference in the processing of
packets, requests, and status indications, then, your driver should best do
what it needs to change state based on the PnP notification. This might,
for instance, mean you have to stop sending packets ‘down’ the stack as IRPs
(or URBs or whatever).
I think the WDK (or at least the older 3790.1830 DDK) sample NDISWDM had
some hints on how to interface to USB. I also think that the NDIS-WDF(USB)
approach to building such a driver is a good idea (may be required now by
WHQL). The WDK sample USBNWIFI shows in great detail how this is put
together.
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xiedong_sl@126.com
Sent: Thursday, October 15, 2009 10:32 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Some confusing NDIS-related questions
Thanks to David ,
"For NDIS-WDM the NDIS Miniport is the FDO (and IIRC the Power Policy
Owner). The surprise removal is delivered to the FDO just like any other PnP
stack and because NDIS has grabbed all of the Dispatch routines, NDIS learns
of the removal and notifies the Miniport - not the other way around.
"
If so , Why NDIS does not hook and handle all requests/Packets to Miniport ,
which are sent in the course of unbinding of Miniport driver with protocol ?
Actually, I still can receive requests in QueryInformation callback.
"
"RE: NDIS 5.0 - Are you targeting Win2K? "
Yes , my driver need to support this Platform .
"
As a Miniport remember, you *react* to what the Port driver (in this case
NDIS) tells you. The only ‘indication’ that a LAN miniport makes to NDIS is
in regards to media state (typically).
"
I see . I am confused the device removal and media state . That’s two
stories.
NDIS handles the details of synchronizing the binding teardown with the
miniport halt process. The NDIS 5.1 Miniport PnP handler is how your
Miniport can coordinate with this activity a bit more proactively.
"
So , I can say that Miniport PnP handler is invoked prior to Unbound ,
Right ?
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