Driver dependencies

I have a root device driver that depends upon another driver. What I’d like to do is to make the OS not start my driver until the other driver has been loaded and is running.

Specifically, I have a pointing device driver, and the pointing device is attached to a serial port. So I can’t have my driver running until the serial port is in level flight.

Thanks for any help.

John Reilly.
Northrop Grumman / Sperry Marine


Sent via the WebMail system at mail.nexet.net

If the drivers have a pnp relationship then you don’t have to do anything,
it will just work. If on the other hand your pointing driver is going to
search for the serial port device and open it directly (it does not have a
pnp relationship) then you need to register for pnp notification using
IoRegisterPlugPlayNotification for the appropriate device interface and
defer opening the serial port until there actually is a serial port to open.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Reilly
Sent: Friday, April 21, 2006 11:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver dependencies

I have a root device driver that depends upon another driver.
What I’d like to do is to make the OS not start my driver
until the other driver has been loaded and is running.

Specifically, I have a pointing device driver, and the
pointing device is attached to a serial port. So I can’t
have my driver running until the serial port is in level flight.

Thanks for any help.

John Reilly.
Northrop Grumman / Sperry Marine


Sent via the WebMail system at mail.nexet.net


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer

Look at the osronline.com article 'buddy drivers'
It is about IoRegisterPlugPlayNotification and others.
That may help.
Norbert.

"If at first you don't succeed, destroy the evidence."
---- snip ----

I have a root device driver that depends upon another driver.
What I'd like to do is to make the OS not start my driver until the
other driver has been loaded and is running.
---- snip ----

All of what mark said is correct. Basically, the pnp manager does not
have this type of loading dependency functionality. For what you want
to happen, a child/parent relationship is required.

d

– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Friday, April 21, 2006 8:28 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Driver dependencies

If the drivers have a pnp relationship then you don’t have to do
anything,
it will just work. If on the other hand your pointing driver is going to
search for the serial port device and open it directly (it does not have
a
pnp relationship) then you need to register for pnp notification using
IoRegisterPlugPlayNotification for the appropriate device interface and
defer opening the serial port until there actually is a serial port to
open.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Reilly
Sent: Friday, April 21, 2006 11:14 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver dependencies

I have a root device driver that depends upon another driver.
What I’d like to do is to make the OS not start my driver
until the other driver has been loaded and is running.

Specifically, I have a pointing device driver, and the
pointing device is attached to a serial port. So I can’t
have my driver running until the serial port is in level flight.

Thanks for any help.

John Reilly.
Northrop Grumman / Sperry Marine


Sent via the WebMail system at mail.nexet.net


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online
at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Are they both PnP drivers? or not so?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “John Reilly”
To: “Windows System Software Devs Interest List”
Sent: Friday, April 21, 2006 7:14 PM
Subject: [ntdev] Driver dependencies

> I have a root device driver that depends upon another driver. What I’d like
to do is to make the OS not start my driver until the other driver has been
loaded and is running.
>
> Specifically, I have a pointing device driver, and the pointing device is
attached to a serial port. So I can’t have my driver running until the serial
port is in level flight.
>
> Thanks for any help.
>
> John Reilly.
> Northrop Grumman / Sperry Marine
>
>
>
>
>
> ________________________________________________________________
> Sent via the WebMail system at mail.nexet.net
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Mark, Maxim, Norbert, and Doron,

Thanks for your help.

To directly answer Maxim, the serial ports are PnP. My driver is not.

We have a couple of problems. First, we have a serial pointing device which does not conform to the serial mouse PnP spec. Then, we have multiple systems connected to a single mouse/keyboard thru a KVM switch. The switch does not quite behave about 20% of the time: when you boot, it will not correctly respond to serenum to indicate that there is a mouse attached to the serial port. So, 20% of the time (unacceptable), your system does not have a mouse. Of course, if this were my system, I’d just ask the device manager to search for new devices and I’d be golden. But we can’t field a system like that.

So, having written a couple of PnP drivers for PCI devices, and having graduated from 5 days of training with Peter Viscarola, I suggested to my company that I write a root-enumerated device driver. I started with the DDK’s mouse driver and elevated it to the status of a root device. All well and good. But I hacked my access to the serial port. So, on some systems, my driver gets a CREATE IRP and tries to open the serial port before the serial port drivers are alive and kicking. This is not good. What I need to do is to make the OS defer my driver’s create until after the serial ports are established.

More than you probably wanted to know, but, you asked, Maxim. And any advice is *gratefully* accepted.

Thanks.

john reilly.
Northrop Grumman / Sperry Marine

+++++++++++++++++++++++
Subject: Re: Driver dependencies
From: “Maxim S. Shatskih”
Date: Sun, 23 Apr 2006 17:09:35 +0400

Are they both PnP drivers? or not so?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “John Reilly”
To: “Windows System Software Devs Interest List”
Sent: Friday, April 21, 2006 7:14 PM
Subject: [ntdev] Driver dependencies

> I have a root device driver that depends upon another driver. What I’d like
to do is to make the OS not start my driver until the other driver has been
loaded and is running.
>
> Specifically, I have a pointing device driver, and the pointing device is
attached to a serial port. So I can’t have my driver running until the serial
port is in level flight.
>
> Thanks for any help.
>
> John Reilly.
> Northrop Grumman / Sperry Marine

________________________________________________________________
Sent via the WebMail system at mail.nexet.net

Register for “serial” device interface arrival notification, and do
IoGetDeviceObjectPointer in the notification.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “John Reilly”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 24, 2006 1:57 PM
Subject: Re:[ntdev] Driver dependencies

> Mark, Maxim, Norbert, and Doron,
>
> Thanks for your help.
>
> To directly answer Maxim, the serial ports are PnP. My driver is not.
>
> We have a couple of problems. First, we have a serial pointing device which
does not conform to the serial mouse PnP spec. Then, we have multiple systems
connected to a single mouse/keyboard thru a KVM switch. The switch does not
quite behave about 20% of the time: when you boot, it will not correctly
respond to serenum to indicate that there is a mouse attached to the serial
port. So, 20% of the time (unacceptable), your system does not have a mouse.
Of course, if this were my system, I’d just ask the device manager to search
for new devices and I’d be golden. But we can’t field a system like that.
>
> So, having written a couple of PnP drivers for PCI devices, and having
graduated from 5 days of training with Peter Viscarola, I suggested to my
company that I write a root-enumerated device driver. I started with the DDK’s
mouse driver and elevated it to the status of a root device. All well and
good. But I hacked my access to the serial port. So, on some systems, my
driver gets a CREATE IRP and tries to open the serial port before the serial
port drivers are alive and kicking. This is not good. What I need to do is to
make the OS defer my driver’s create until after the serial ports are
established.
>
> More than you probably wanted to know, but, you asked, Maxim. And any advice
is gratefully accepted.
>
> Thanks.
>
> john reilly.
> Northrop Grumman / Sperry Marine
>
>
> +++++++++++++++++++++++
> Subject: Re: Driver dependencies
> From: “Maxim S. Shatskih”
> Date: Sun, 23 Apr 2006 17:09:35 +0400
>
> Are they both PnP drivers? or not so?
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “John Reilly”
> To: “Windows System Software Devs Interest List”
> Sent: Friday, April 21, 2006 7:14 PM
> Subject: [ntdev] Driver dependencies
>
>
> > I have a root device driver that depends upon another driver. What I’d
like
> to do is to make the OS not start my driver until the other driver has been
> loaded and is running.
> >
> > Specifically, I have a pointing device driver, and the pointing device is
> attached to a serial port. So I can’t have my driver running until the
serial
> port is in level flight.
> >
> > Thanks for any help.
> >
> > John Reilly.
> > Northrop Grumman / Sperry Marine
>
>
>
>
>
> ________________________________________________________________
> Sent via the WebMail system at mail.nexet.net
>
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Right - so the answer is to register for pnp notification of the serial
port device interface. Either that or implement a worker thread whose
task is to poll for the serial port device. The pnp notification is
obviously the preferred mechanism.

The pnp driver load order is defined primarily by pnp enumeration order,
not by those legacy load order bits in the service key for your driver.
(Some of those bits still play a moderating role however.) You need to
give up on the load order concept and focus on detecting when the serial
port is enumerated and instantiated instead.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Reilly
Sent: Monday, April 24, 2006 5:57 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Driver dependencies

Mark, Maxim, Norbert, and Doron,

Thanks for your help.

To directly answer Maxim, the serial ports are PnP. My driver is not.

We have a couple of problems. First, we have a serial pointing device
which does not conform to the serial mouse PnP spec. Then, we have
multiple systems connected to a single mouse/keyboard thru a KVM switch.
The switch does not quite behave about 20% of the time: when you boot,
it will not correctly respond to serenum to indicate that there is a
mouse attached to the serial port. So, 20% of the time (unacceptable),
your system does not have a mouse. Of course, if this were my system,
I’d just ask the device manager to search for new devices and I’d be
golden. But we can’t field a system like that.

So, having written a couple of PnP drivers for PCI devices, and having
graduated from 5 days of training with Peter Viscarola, I suggested to
my company that I write a root-enumerated device driver. I started with
the DDK’s mouse driver and elevated it to the status of a root device.
All well and good. But I hacked my access to the serial port. So, on
some systems, my driver gets a CREATE IRP and tries to open the serial
port before the serial port drivers are alive and kicking. This is not
good. What I need to do is to make the OS defer my driver’s create
until after the serial ports are established.

More than you probably wanted to know, but, you asked, Maxim. And any
advice is *gratefully* accepted.

Thanks.

john reilly.
Northrop Grumman / Sperry Marine

+++++++++++++++++++++++
Subject: Re: Driver dependencies
From: “Maxim S. Shatskih”
Date: Sun, 23 Apr 2006 17:09:35 +0400

Are they both PnP drivers? or not so?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “John Reilly”
To: “Windows System Software Devs Interest List”
Sent: Friday, April 21, 2006 7:14 PM
Subject: [ntdev] Driver dependencies

> I have a root device driver that depends upon another driver. What
I’d like
to do is to make the OS not start my driver until the other driver has
been
loaded and is running.
>
> Specifically, I have a pointing device driver, and the pointing device
is
attached to a serial port. So I can’t have my driver running until the
serial
port is in level flight.
>
> Thanks for any help.
>
> John Reilly.
> Northrop Grumman / Sperry Marine

________________________________________________________________
Sent via the WebMail system at mail.nexet.net


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Exactly what mark said. You need to lie to mouclass about the mouse and
asynchronously (potentially) open it later. Have you read this article?

http://www.wd-3.com/archive/SerialAttachedDevices.htm

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Monday, April 24, 2006 6:14 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Driver dependencies

Right - so the answer is to register for pnp notification of the serial
port device interface. Either that or implement a worker thread whose
task is to poll for the serial port device. The pnp notification is
obviously the preferred mechanism.

The pnp driver load order is defined primarily by pnp enumeration order,
not by those legacy load order bits in the service key for your driver.
(Some of those bits still play a moderating role however.) You need to
give up on the load order concept and focus on detecting when the serial
port is enumerated and instantiated instead.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of John Reilly
Sent: Monday, April 24, 2006 5:57 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Driver dependencies

Mark, Maxim, Norbert, and Doron,

Thanks for your help.

To directly answer Maxim, the serial ports are PnP. My driver is not.

We have a couple of problems. First, we have a serial pointing device
which does not conform to the serial mouse PnP spec. Then, we have
multiple systems connected to a single mouse/keyboard thru a KVM switch.
The switch does not quite behave about 20% of the time: when you boot,
it will not correctly respond to serenum to indicate that there is a
mouse attached to the serial port. So, 20% of the time (unacceptable),
your system does not have a mouse. Of course, if this were my system,
I’d just ask the device manager to search for new devices and I’d be
golden. But we can’t field a system like that.

So, having written a couple of PnP drivers for PCI devices, and having
graduated from 5 days of training with Peter Viscarola, I suggested to
my company that I write a root-enumerated device driver. I started with
the DDK’s mouse driver and elevated it to the status of a root device.
All well and good. But I hacked my access to the serial port. So, on
some systems, my driver gets a CREATE IRP and tries to open the serial
port before the serial port drivers are alive and kicking. This is not
good. What I need to do is to make the OS defer my driver’s create
until after the serial ports are established.

More than you probably wanted to know, but, you asked, Maxim. And any
advice is *gratefully* accepted.

Thanks.

john reilly.
Northrop Grumman / Sperry Marine

+++++++++++++++++++++++
Subject: Re: Driver dependencies
From: “Maxim S. Shatskih”
Date: Sun, 23 Apr 2006 17:09:35 +0400

Are they both PnP drivers? or not so?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “John Reilly”
To: “Windows System Software Devs Interest List”
Sent: Friday, April 21, 2006 7:14 PM
Subject: [ntdev] Driver dependencies

> I have a root device driver that depends upon another driver. What
I’d like
to do is to make the OS not start my driver until the other driver has
been
loaded and is running.
>
> Specifically, I have a pointing device driver, and the pointing device
is
attached to a serial port. So I can’t have my driver running until the
serial
port is in level flight.
>
> Thanks for any help.
>
> John Reilly.
> Northrop Grumman / Sperry Marine

________________________________________________________________
Sent via the WebMail system at mail.nexet.net


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer