Re: Starting a driver within a driver...
- From: "Doron Holan [MS]" <doronh@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 18 Jun 2006 04:03:20 GMT
no, you can't pend the start irp. on a lot of OS variants, the pnp enum
lock is held and the pnp manager will synchronously wait for the start to
complete before starting the next device.
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ray Trent" <ratrent@xxxxxxxxxxxxx> wrote in message
news:%23tim$48OFHA.2348@xxxxxxxxxxxxxxxxxxxxxxx
Can he just pend the start-irp for device 2 if device 1 isn't started yet,
and complete it when signalled? Seems like the rest of the system might
have a more "correct" view of the world in this case.
BTW, if there's no particular reason to have 2 separate .sys files, it's
sometimes much simpler to implement a unified multi-device driver (i.e. 1
.sys file that handles multiple devices of different types), because a lot
of the inter-device dependencies can be handled with global variables and
internal function calls rather than more complex signaling methods.
Eliyas Yakub [MSFT] wrote:
Device #2 depends on Device #1.
Can I do something with dependencies to ensure the OS starts device #1
first, then device #2?
There is no system provided way to control start order of two devices.
Assuming that cannot be done with dependencies, I
need #1 to signal #2 to start--and #2 to start only if #1 is already
started. Then the order in which the OS tells the drivers to start won't
matter--while the dependency effectively holds.
You can devise your own signalling technique. I have used callback
objects (ExCreateCallback) in my drivers to control load order
dependencies of two independent drivers. If you need sample code, send me
an email note.
The way I see you solving the problem is that if #2 is started before #1
then #2 would complete the start-irp with STATUS_SUCCESS, but wouldn't
really initialize the device until #1 starts and signals #2. Correct? I'm
not sure all the thing that PCI bus driver does when it receives the
start-irp, but wouldn't you have any problem if start-device of #2 is
handled by the pci bus before #1?
--
../ray\..
.
- Follow-Ups:
- Re: Starting a driver within a driver...
- From: Ray Trent
- Re: Starting a driver within a driver...
- References:
- Starting a driver within a driver...
- From: Cosmo
- Re: Starting a driver within a driver...
- From: Eliyas Yakub [MSFT]
- Re: Starting a driver within a driver...
- From: Ray Trent
- Starting a driver within a driver...
- Prev by Date: Re: IOCTL_READ_REGISTERS
- Next by Date: Re: Devices and GUIDs
- Previous by thread: Re: Starting a driver within a driver...
- Next by thread: Re: Starting a driver within a driver...
- Index(es):
Relevant Pages
|