windows shutdown problem after calling NDIS "halt handler"

windows shutdown problem after calling NDIS "halt handler"

Post by yoni.baro » Thu, 16 Oct 2003 21:27:14


I have an NDIS miniport driver that communicates with a USB
communication device
(modem). In some windows 98 SE machines windows hangs while shutdown
if the modem is attached.
I can see that the "Halt handler" of my driver is called and completes
successfully, freeing all resources, but windows just hangs with the
"shutting down screen".
If I plug out the USB modem and then shut down, windows doesn't hang.

I also noticed that if NO protocol is attached to the device
(TCP/IP,IPX/SPX etc), then windows doesn't hang.

I installed the shutdown patch and NDIS intermediate driver patch but
non help.

Does anyone have an idea?

Thanks in advance,
Yoni Baron,
Conexant Systems.
 
 
 

windows shutdown problem after calling NDIS "halt handler"

Post by Stephan Wo » Fri, 17 Oct 2003 01:12:30

Make sure you have completed all send and set/query information
requests that pend in your miniport before returning from
MiniportHalt().

Stephan
---
On 15 Oct 2003 05:27:14 -0700, XXXX@XXXXX.COM (Yoni Baron)

 
 
 

windows shutdown problem after calling NDIS "halt handler"

Post by yoni.baro » Fri, 17 Oct 2003 17:13:16

Hi Stephen,

The Problem happens only on some win98 machines.
In those machines I see that NDIS sends a MiniportReset just before
it calls the Halt Handler. The strange thing is that NDIS doesn't wait
for the reset to complete (by calling NdisMResetComplete) and calls
the Halt handler while the device still resets.

I'm pretty sure all sends are complete, I'll check again.

Thanks,
Yoni.
 
 
 

windows shutdown problem after calling NDIS "halt handler"

Post by yoni.baro » Fri, 17 Oct 2003 23:57:06

I found our why the reset happens.
At shutdown, NDIS sends me an NdisSetInformation with
OID_GEN_CURRENT_PACKET_FILTER, it takes the driver couple of seconds
to complete
the request (I still have to figure out why so long), It apears that
NDIS thought that the operation has timed out and thus sent a reset
request which started the bad shutdown sequence.\
When I canceled the timeout for the send and set\get using
NdisMSetAttributesEx,
The MiniportReset is not called, the management request completes
successfully and windows shuts down nicely.

Bye,
Yoni.