Re: Starting a driver within a driver...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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\..


.



Relevant Pages

  • Re: Starting a driver within a driver...
    ... on a lot of OS variants, the pnp enum ... > internal function calls rather than more complex signaling methods. ... >>>Can I do something with dependencies to ensure the OS starts device #1 ... Then the order in which the OS tells the drivers to start won't ...
    (microsoft.public.development.device.drivers)
  • Re: Starting a driver within a driver...
    ... Can he just pend the start-irp for device 2 if device 1 isn't started yet, ... 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, because a lot of the inter-device dependencies can be handled with global variables and internal function calls rather than more complex signaling methods. ... I have used callback objects in my drivers to control load order dependencies of two independent drivers. ...
    (microsoft.public.development.device.drivers)
  • Re: Starting a driver within a driver...
    ... Can he just pend the start-irp for device 2 if device 1 isn't started yet, ... 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, because a lot of the inter-device dependencies can be handled with global variables and internal function calls rather than more complex signaling methods. ... Then the order in which the OS tells the drivers to start won't ...
    (microsoft.public.development.device.drivers)
  • Re: WGN News Report on Pedalcyclist Commuters
    ... drivers who expect and demand gutter riding/passing, sidewalk running, ... Yeah, well, AFAIK there is no exception to the prohibition of passing ... There wasn't any evidence she was signaling L. ... of stopped motorists at a red signal or stop sign in the gutter, ...
    (rec.autos.driving)
  • Re: Linux 2.6.26-rc1
    ... dependencies to A or select these dependencies by A. ... those main drivers supports a large number of different ... allows that the same driver to use different internal components. ... if you have a em28xx device with msp3400 and tvp5150 and another ...
    (Linux-Kernel)