why pnp manager remove pdo when install driver for it

Hi forks,

I am designing a pci bus driver and a scsi miniport driver. My pci
driver enumerate some PDOs and scsi miniport driver will service these
PDO. When I attach a new device, my pci driver will enumerate a new
device and create a PDO for it. Then scsi miniport driver will enter
FIND_ADAPTER, …, routines to service this new device. But windows
will pop up a ‘Find a new hardware’ dialog to notify me to install
driver for new device. I know that because my driver doesn’t get a
digit signed. So I install scsi miniport driver again to service this
new device.

When I install scsi miniport driver, pci driver will receive
REMOVE_DEVICE IRP to remove the PDO that represents for the new device
and create a new one again. Then pci and scsi miniport driver can works
well. Does my pci driver work properly for remove/create pdo for new
device when installing scsi miniport driver?

Thanks

Wayne

Hi forks,

Sorry for sending thread twice since I have some trouble with my email client.

I am designing a pci bus driver and a scsi miniport driver. My pci driver enumerate some PDOs and scsi miniport driver will service these PDO. When I attach a new device, my pci driver will enumerate a new device and create a PDO for it. Then scsi miniport driver will enter FIND_ADAPTER, …, routines to service this new device. But windows will pop up a ‘Find a new hardware’ dialog to notify me to install driver for new device. I know that because my driver doesn’t get a digit signed. So I install scsi miniport driver again to service this new device.

When I install scsi miniport driver, pci driver will receive REMOVE_DEVICE IRP to remove the PDO that represents for the new device and create a new one again. Then pci and scsi miniport driver can works well. Does my pci driver work properly for remove/create pdo for new device when installing scsi miniport driver?

Thanks
Wayne

Hello spoon,

My guess is that the critical device database is installing your driver, which is a no INF install which barely installs the device, just to get it up and running. Then the pnp manager kicks in and does a pnp install. Any time a device has a new driver installed on it, the stack will get a remove irp sent to it. In this case, everyone except for the PDO detaches and deletes their device objects. The stack is then rebuilt on the same PDO when the INF based install succeeds. A bus driver deletes a PDO in 2 conditions

  1. it reported the PDO missing through QDR/BusRelations and got the subsequent remove irp. Just b/c the bus driver sees a surprise removal irp does not mean it has been reported as missing.
  2. the parent FDO receives a remove irp while the PDO is in the removed (or unstarted) state

KMDF plug: we take care of this state tracking stuff for you

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@oracle.com
Sent: Sunday, November 02, 2008 10:01 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] why pnp manager remove pdo when install driver for it

Hi forks,

Sorry for sending thread twice since I have some trouble with my email client.

I am designing a pci bus driver and a scsi miniport driver. My pci driver enumerate some PDOs and scsi miniport driver will service these PDO. When I attach a new device, my pci driver will enumerate a new device and create a PDO for it. Then scsi miniport driver will enter FIND_ADAPTER, …, routines to service this new device. But windows will pop up a ‘Find a new hardware’ dialog to notify me to install driver for new device. I know that because my driver doesn’t get a digit signed. So I install scsi miniport driver again to service this new device.

When I install scsi miniport driver, pci driver will receive REMOVE_DEVICE IRP to remove the PDO that represents for the new device and create a new one again. Then pci and scsi miniport driver can works well. Does my pci driver work properly for remove/create pdo for new device when installing scsi miniport driver?

Thanks
Wayne


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Doron Holan wrote:

Hello spoon,

My guess is that the critical device database is installing your driver, which is a no INF install which barely installs the device, just to get it up and running. Then the pnp manager kicks in and does a pnp install. Any time a device has a new driver installed on it, the stack will get a remove irp sent to it. In this case, everyone except for the PDO detaches and deletes their device objects. The stack is then rebuilt on the same PDO when the INF based install succeeds. A bus driver deletes a PDO in 2 conditions

  1. it reported the PDO missing through QDR/BusRelations and got the subsequent remove irp. Just b/c the bus driver sees a surprise removal irp does not mean it has been reported as missing.
  2. the parent FDO receives a remove irp while the PDO is in the removed (or unstarted) state

KMDF plug: we take care of this state tracking stuff for you

If I may provide the Reader’s Digest version of this post: “Yes, the
behavior you see is perfectly normal”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

http-equiv=“Content-Type”>

cite="mid:C3B3DF730DB4974E83E60BA147988FE916036CE533@NA-EXMSG-W601.wingroup.windeploy.ntdev.microsoft.com"
type=“cite”>

My guess is that thecritical device databaseis installing your driver, which is ano INF install which barely installs the device, just to get it up and running. Then the pnp manager kicks in and does a pnp install.

Sorry I don’t know what’s your mean. In PCI bus driver, I will
enumerate child device ID as “ORACLEPCI\BD” and scsi miniport driver
INF file will install driver service these devices. So please give a
more detail explanation.

Thanks

Wayne