WDF PNP States

Hi ,

I have a virtual USB BUS driver (KMDF based) that creates PDO’s for USB
over Ethernet. I have a couple devices that behave differently than most
other devices.

First time I plug in the device, it seems to work i.e. gets the
descriptors and sets up the pipes and does transfers.

If I unplug it and replug the device, it gets the first descriptor and
then goes to D3 state.

If now I reboot I keep getting the same behavior where the device just
won’t come up.

Here is the dump for wdfdevice object: It somehow shows that device is
being removed. Although I don’t know why and who would initiate the
remove. Any ideas anyone ?

!wdfkd.wdfdevice 0x79285FF8 0xf

Dumping WDFDEVICE 0x79285ff8

=================================

WDM PDEVICE_OBJECTs: self 8a277f00

Pnp state: 115 ( WdfDevStatePnpRemovedPdoWait )

Power state: 315 ( WdfDevStatePowerStopped )

Power Pol state: 563 ( WdfDevStatePwrPolStopped )

Parent WDFDEVICE 75d50fe8

Parent states:

Pnp state: 119 ( WdfDevStatePnpStarted )

Power state: 307 ( WdfDevStatePowerD0 )

Power Pol state: 565 ( WdfDevStatePwrPolStarted )

No pended pnp or power irps

Device is NOT the power policy owner for the stack

Pnp state history:

[0] WdfDevStatePnpEnableInterfaces (0x109)

[1] WdfDevStatePnpStarted (0x119)

[2] WdfDevStatePnpStartedRemoving (0x11c)

[3] WdfDevStatePnpRemovingDisableInterfaces (0x117)

[4] WdfDevStatePnpRemoved (0x113)

[5] WdfDevStatePnpRemovedChildrenRemoved (0x136)

[6] WdfDevStatePnpCheckForDevicePresence (0x101)

[7] WdfDevStatePnpRemovedPdoWait (0x115)

Power state history:

[0] WdfDevStatePowerD0Starting (0x30f)

[1] WdfDevStatePowerD0StartingConnectInterrupt (0x310)

[2] WdfDevStatePowerD0StartingDmaEnable (0x311)

[3] WdfDevStatePowerD0StartingStartSelfManagedIo (0x312)

[4] WdfDevStatePowerDecideD0State (0x313)

[5] WdfDevStatePowerD0BusWakeOwner (0x309)

[6] WdfDevStatePowerGotoD3Stopped (0x314)

[7] WdfDevStatePowerStopped (0x315)

Power policy state history:

[0] WdfDevStatePwrPolObjectCreated (0x500)

[1] WdfDevStatePwrPolStarting (0x501)

[2] WdfDevStatePwrPolStarted (0x565)

[3] WdfDevStatePwrPolStartingSucceeded (0x502)

[4] WdfDevStatePwrPolStopping (0x55b)

[5] WdfDevStatePwrPolStoppingWaitingForImplicitPowerDown (0x579)

[6] WdfDevStatePwrPolStoppingSendStatus (0x55d)

[7] WdfDevStatePwrPolStopped (0x563)

Properties:

SynchronizationScope: WdfSynchronizationScopeNone

ExecutionLevel: WdfExecutionLevelDispatch

IoType: WdfDeviceIoBuffered

FileObjectClass: WdfFileObjectNotRequired

Exclusive: No

AutoForwardCleanupClose: No

DefaultIoPriorityBoost: 0

Thanks

Pankaj

The remove is expected if the start fails. Remember that a remove at the pdo does not mean the pro was reported as physically missing, just that the pdo is in a non started state. My guess is that you are failing to do something or return the expected data for the fdo that it expects and the fdo is failing the start

d

dent from a phine with no keynoard


From: Pankaj Garg
Sent: Thursday, February 10, 2011 1:23 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDF PNP States

Hi ,
I have a virtual USB BUS driver (KMDF based) that creates PDO?s for USB over Ethernet. I have a couple devices that behave differently than most other devices.
First time I plug in the device, it seems to work i.e. gets the descriptors and sets up the pipes and does transfers.
If I unplug it and replug the device, it gets the first descriptor and then goes to D3 state.
If now I reboot I keep getting the same behavior where the device just won?t come up.

Here is the dump for wdfdevice object: It somehow shows that device is being removed. Although I don?t know why and who would initiate the remove. Any ideas anyone ?

!wdfkd.wdfdevice 0x79285FF8 0xf

Dumping WDFDEVICE 0x79285ff8

WDM PDEVICE_OBJECTs: self 8a277f00

Pnp state: 115 ( WdfDevStatePnpRemovedPdoWait )
Power state: 315 ( WdfDevStatePowerStopped )
Power Pol state: 563 ( WdfDevStatePwrPolStopped )

Parent WDFDEVICE 75d50fe8
Parent states:
Pnp state: 119 ( WdfDevStatePnpStarted )
Power state: 307 ( WdfDevStatePowerD0 )
Power Pol state: 565 ( WdfDevStatePwrPolStarted )

No pended pnp or power irps
Device is NOT the power policy owner for the stack

Pnp state history:
[0] WdfDevStatePnpEnableInterfaces (0x109)
[1] WdfDevStatePnpStarted (0x119)
[2] WdfDevStatePnpStartedRemoving (0x11c)
[3] WdfDevStatePnpRemovingDisableInterfaces (0x117)
[4] WdfDevStatePnpRemoved (0x113)
[5] WdfDevStatePnpRemovedChildrenRemoved (0x136)
[6] WdfDevStatePnpCheckForDevicePresence (0x101)
[7] WdfDevStatePnpRemovedPdoWait (0x115)

Power state history:
[0] WdfDevStatePowerD0Starting (0x30f)
[1] WdfDevStatePowerD0StartingConnectInterrupt (0x310)
[2] WdfDevStatePowerD0StartingDmaEnable (0x311)
[3] WdfDevStatePowerD0StartingStartSelfManagedIo (0x312)
[4] WdfDevStatePowerDecideD0State (0x313)
[5] WdfDevStatePowerD0BusWakeOwner (0x309)
[6] WdfDevStatePowerGotoD3Stopped (0x314)
[7] WdfDevStatePowerStopped (0x315)

Power policy state history:
[0] WdfDevStatePwrPolObjectCreated (0x500)
[1] WdfDevStatePwrPolStarting (0x501)
[2] WdfDevStatePwrPolStarted (0x565)
[3] WdfDevStatePwrPolStartingSucceeded (0x502)
[4] WdfDevStatePwrPolStopping (0x55b)
[5] WdfDevStatePwrPolStoppingWaitingForImplicitPowerDown (0x579)
[6] WdfDevStatePwrPolStoppingSendStatus (0x55d)
[7] WdfDevStatePwrPolStopped (0x563)

Properties:
SynchronizationScope: WdfSynchronizationScopeNone
ExecutionLevel: WdfExecutionLevelDispatch
IoType: WdfDeviceIoBuffered
FileObjectClass: WdfFileObjectNotRequired
Exclusive: No
AutoForwardCleanupClose: No
DefaultIoPriorityBoost: 0

Thanks
Pankaj


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