Re: Starting a driver within a driver...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




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?


.



Relevant Pages

  • 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...
    ... >> Assuming that cannot be done with dependencies, ... Then the order in which the OS tells the drivers to start won't ... > then #2 would complete the start-irp with STATUS_SUCCESS, ... > not sure all the thing that PCI bus driver does when it receives the ...
    (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: 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)
  • Re: [patch] MTD: fix DOC2000/2001/2001PLUS build error
    ... the old versions of the DiskOnChip drivers which don't even use the ... generic NAND code anyway. ... select a component somewhere which then picks its dependencies. ... there's a solution already within the existing Kconfig ...
    (Linux-Kernel)