I have driver A,B and C. A depends on B and B depends on C. So
obviously I will load C first and then B and then A. When C is ready,
it will set an event using SetEvent function to tell B, so does B. B
will wait C's event in init to finish its initialization. So does A.

But I found that waiting an event calling WaitforSingleOject isn't a
good idea in the init function. this will slow down the whole system's
booting up.

any good approach to this issue?

thanks,

Mike

Re: driver loading sequence by Bruce

Bruce
Fri Dec 29 10:58:01 CST 2006

That all depends on the requiements of these drivers. I suspect that a
chapter or two could be written in a book on this topic. There are lots of
tools available, including merge them into one driver. But without knowing
anything about what you are doing, it is impossible to advise you.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

<suqian99@hotmail.com> wrote in message
news:1167405739.480547.52570@k21g2000cwa.googlegroups.com...
>I have driver A,B and C. A depends on B and B depends on C. So
> obviously I will load C first and then B and then A. When C is ready,
> it will set an event using SetEvent function to tell B, so does B. B
> will wait C's event in init to finish its initialization. So does A.
>
> But I found that waiting an event calling WaitforSingleOject isn't a
> good idea in the init function. this will slow down the whole system's
> booting up.
>
> any good approach to this issue?
>
> thanks,
>
> Mike
>



Re: driver loading sequence by Steve

Steve
Fri Dec 29 15:42:30 CST 2006

> But I found that waiting an event calling WaitforSingleOject isn't a
> good idea in the init function. this will slow down the whole system's
> booting up.
>
> any good approach to this issue?
Don't do it with an event like that. use the Order value in the registery to
have drivers loaded based on an increasing value in the order value. So that
the order for B is C+1 and A is B+1 that way the device manager will load
them and call the init functions in the correct sequence and you can know
the driver has returned from Init correctly.

Although I would seriously challenge you to re-think your design as a 3
layered driver model like that would be an exceptionally rare thing. There
is probably a better way of doing things.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: driver loading sequence by SachinNikam

SachinNikam
Tue Jan 02 03:40:01 CST 2007

Hi,

As steve said make based on the order in the registry the driver loading
sequence is determeined.
Also for power managent use the proper IClass value.

Are your drivers "Stream Interface Driver" ?

Re: driver loading sequence by suqian99

suqian99
Tue Jan 02 08:45:01 CST 2007

Hi, thanks guys,
this is for smart phone based on wince.
a RIL driver will talk to a MUX driver, a MUX driver to talk to USB
driver. so RIL depends on MUX and MUX depends on USB. RIL and MUX are
stream interface drivers.
Sachin Nikam wrote:
> Hi,
>
> As steve said make based on the order in the registry the driver loading
> sequence is determeined.
> Also for power managent use the proper IClass value.
>
> Are your drivers "Stream Interface Driver" ?


Re: driver loading sequence by Gary

Gary
Tue Jan 02 10:38:58 CST 2007

Hi Sachin and Steve,
Because the PCI bus is loaded later in the boot sequence, I have a PCI card
driver that explicitly loads a stream interface driver with a call to
ActivateDeviceEx().

The initial loading of the stream interface driver intentionally fails due
to invalid registry values, because the PCI drivers are not yet loaded. Is
there a better way to handle this driver dependency? Perhaps there's a way
to defer the stream interface driver load until after PCI bus with a
registry entry?

Thanks,
Gary

"Sachin Nikam" <SachinNikam@discussions.microsoft.com> wrote in message
news:F1E64FD8-916A-4582-AA74-A0F1B9564157@microsoft.com...
> Hi,
>
> As steve said make based on the order in the registry the driver loading
> sequence is determeined.
> Also for power managent use the proper IClass value.
>
> Are your drivers "Stream Interface Driver" ?



Re: driver loading sequence by Bruce

Bruce
Tue Jan 02 11:22:14 CST 2007

Gary:

You just hijacked this discussion thread for your own purposes, instead you
should create a new thread.

Since you discussion is somewhat related, I will go ahead and answer it.
You can use the "Order" value in the registry to set the load order of the
drivers. Low numbers load first.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"Gary Swalling" <garret.swalling@spansion.com.nospam> wrote in message
news:ehXaswoLHHA.536@TK2MSFTNGP02.phx.gbl...
> Hi Sachin and Steve,
> Because the PCI bus is loaded later in the boot sequence, I have a PCI
> card driver that explicitly loads a stream interface driver with a call to
> ActivateDeviceEx().
>
> The initial loading of the stream interface driver intentionally fails due
> to invalid registry values, because the PCI drivers are not yet loaded.
> Is there a better way to handle this driver dependency? Perhaps there's a
> way to defer the stream interface driver load until after PCI bus with a
> registry entry?
>
> Thanks,
> Gary
>
> "Sachin Nikam" <SachinNikam@discussions.microsoft.com> wrote in message
> news:F1E64FD8-916A-4582-AA74-A0F1B9564157@microsoft.com...
>> Hi,
>>
>> As steve said make based on the order in the registry the driver loading
>> sequence is determeined.
>> Also for power managent use the proper IClass value.
>>
>> Are your drivers "Stream Interface Driver" ?
>
>