Hi!
Is it a good idea to postpone IRP_MN_START_DEVICE completion for a while?
Another words, will PnP manager hang untill IRP_MN_START_DEVICE is
completed?
Thx
Andrew
Hi!
Is it a good idea to postpone IRP_MN_START_DEVICE completion for a while?
Another words, will PnP manager hang untill IRP_MN_START_DEVICE is
completed?
Thx
Andrew
Hi
Maybe I did not put it clear first time so second try.
There is root-enumerated device. It takes about ~30 sec. to start it.
So, upon receiving IRP_MN_START_DEVICE I call IoMarkPending, stash away
irp and return STATUS_PENDING.
I hoped Windows proceeds booting but it hangs until this irp is completed
According SoftIce it loops in ExReleaseResourceForThread.
Why is this? Anyone with comments?
Thx
Andrew
Well the ddk documentation doesn’t say that you CAN’T return status pending
from start device. I believe that current versions of NT serialize pnp
enumeration operations, which is why nothing much happens while you are
waiting 30 seconds. I’d suggest not doing this, and instead handing this 30
second bringup task off to a worker thread while returning success from
start device, if at all possible, and then blocking IO operations (or
failing them if the task fails,) until the bringup operation completes.
-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Sent: Monday, March 18, 2002 11:43 AM
To: NT Developers Interest List
Subject: [ntdev] Re: IRP_MN_START_DEVICEHi
Maybe I did not put it clear first time so second try.
There is root-enumerated device. It takes about ~30 sec. to
start it. So, upon receiving IRP_MN_START_DEVICE I call
IoMarkPending, stash away irp and return STATUS_PENDING. I
hoped Windows proceeds booting but it hangs until this irp is
completed According SoftIce it loops in
ExReleaseResourceForThread. Why is this? Anyone with
comments? Thx Andrew
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%
Mark thx for your response.
What I did for right now:
-spawn worker thread to control actual start of a device
-complete IRP_MN_START_DEVICE with STATUS_SUCCESS
-later, if start of the device fails, call IoInvalidateDeviceState with
subsequent return of PNP_DEVICE_FAILED on IRP_MN_QUERY_PNP_DEVICE_STATE
request
Kind of a kludge, but works
Andrew
Given the (semi-undocumented) serialized nature of pnp enumeration, I think
this is the correct solution.
Mark Roddy
Consultant
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
wrote in message news:xxxxx@ntdev…
>
> Mark thx for your response.
> What I did for right now:
> -spawn worker thread to control actual start of a device
> -complete IRP_MN_START_DEVICE with STATUS_SUCCESS
> -later, if start of the device fails, call IoInvalidateDeviceState with
> subsequent return of PNP_DEVICE_FAILED on IRP_MN_QUERY_PNP_DEVICE_STATE
> request
>
> Kind of a kludge, but works
> Andrew
>
>