I am writing a WDM driver for a simple PCMCIA card and testing it under
Windows 2000/SP3.
The driver is based on a framework created with Walter Oney's WDM Driver
Wizard. In particular, the Power handling functions are more or less
unchanged.
My problem is, that when the system wakes up from standby mode, Windows
thinks that the hardware has changed and starts the New-Hardware-Wizard.
The driver appears to complete the processing of the power IRPs, but then
receives a IRP_MN_SURPRISE_REMOVAL request, following which the driver is
unloaded.
The New-Hardware-Wizard indicates that it has detected a device named
MTD-0002. I have been advised that this probably means that Wihdows is
unable to read the Card Information Structure (CIS) on the PCMCIA card, but
I can see no reason why this would be the case.
I have set D3Latency parameter to 1000 (100ms) which should be more than
enough.
On inserting the card into the slot, Windows never has any difficulty
reading the CIS, so I don't see why there should be a problem when it is
powered up on leaving standby mode.
Does anybody have any idea what could be causing this effect? I would be
grateful for any help.
Thanks in advance
Phil
(By the way, this is newly developed hardware and the error could be in the
CIS. It is not a big problem for us to reprogam this memory.)