For my USB device I have a few polling threads which starts polling the
device when it is opened. IRPs are working in cooperation with these
threads. The device works fine with driver verifier enabled under
excessive stress. Things become unstable when the system goes to standby.
The power management code is written carefully and the system participates
in power protocol very well when there is no polling thread running. If I
run the polling threads while going to standby then I get BSOD of two
types:
BugCheck 40000080, {0, 0, 0, 0}
or
BugCheck 7F, {8, 80042000, 0, 0}
The description of the bugcheck (by !analyze -v) does not give any clue to
me to fix.
I found in one document that polling thread for USB devices makes power
mangement complicated, that’s all, no hints how to handle power management
in this case in that doc.
I made some experiment by not using polling thread but do the task of
polling thread in the corresponding dispatch routine and everything works
fine, but I need to handle all the cases of life-cycle of all types of
IRPs. This brings a significant amount of work to do at this moment.
Does anybody come across this problem and get it solved?
To Gurus: any whitepaper or document on this matter to your knowledge?
Any suggestion is appreciated.
Hakim
If your device is powered down below power device D0, you have no business
attempting to read anything from it. I would suggest you suspend polling
when powered down, and resume polling when powered back up.
–
Bill McKenzie
Windows DDK MVP
OSR - Windows System Software Development, Training, and Consulting
wrote in message news:xxxxx@ntdev…
>
> For my USB device I have a few polling threads which starts polling the
> device when it is opened. IRPs are working in cooperation with these
> threads. The device works fine with driver verifier enabled under
> excessive stress. Things become unstable when the system goes to standby.
> The power management code is written carefully and the system participates
> in power protocol very well when there is no polling thread running. If I
> run the polling threads while going to standby then I get BSOD of two
> types:
>
> BugCheck 40000080, {0, 0, 0, 0}
> or
> BugCheck 7F, {8, 80042000, 0, 0}
>
> The description of the bugcheck (by !analyze -v) does not give any clue to
> me to fix.
>
> I found in one document that polling thread for USB devices makes power
> mangement complicated, that’s all, no hints how to handle power management
> in this case in that doc.
>
> I made some experiment by not using polling thread but do the task of
> polling thread in the corresponding dispatch routine and everything works
> fine, but I need to handle all the cases of life-cycle of all types of
> IRPs. This brings a significant amount of work to do at this moment.
>
> Does anybody come across this problem and get it solved?
> To Gurus: any whitepaper or document on this matter to your knowledge?
>
> Any suggestion is appreciated.
>
> Hakim
>
>