HELP: PNP-related assertion by DNF_NON_STOPPED_REBALANCE !?!

I developed the bus driver, which is just enumerates its devices.

After the child PDO-device has been removed by IRP_MN_REMOVE_DEVICE, the flag DNF_NON_STOPPED_REBALANCE still present in the DevNode->Flags !

This cause an “Assertion failed” in pnpsubs.c, line 5840

So, as described in DDK, actually I does not delete the PDO-device-object by IoDeleveDevice(), because the child-device is physically present on the bus.

What is wrong ? Somebody can help me ?

*********************** Extraction from WinDbg log ***********************

IRP_MN_QUERY_DEVICE_RELATIONS

[…]

IRP_MN_QUERY_REMOVE_DEVICE

[…]

IRP_MN_REMOVE_DEVICE

kd> !devobj ff327778
Device object (ff327778) is for:
0000002b \Driver\CronyxOmega DriverObject ff4ec958
Current Irp 00000000 RefCount 0 Type 00000022 Flags 00003044
DevExt ff327830 DevObjExt ff327988 DevNode ff4b5ce8
ExtensionFlags (0xa0000008) DOE_REMOVE_PROCESSED, DOE_RAW_FDO,
DOE_DESIGNATED_FDO
Device queue is not busy.

kd> !devnode ff4b5ce8
DevNode 0xff4b5ce8 for PDO 0xff327778
Parent 0xfcd9e868 Sibling 0xff425d88 Child 0000000000
InstancePath is “CronyxOmega\UART16750\CronyxOmega&VER_01&BOARD_00&PORT_000”
EnumerationMutex is held
Flags (0x00058058) DNF_PROCESSED, DNF_ENUMERATED,
DNF_ADDED, DNF_RESOURCE_REQUIREMENTS_CHANGED,
DNF_NON_STOPPED_REBALANCE, DNF_STARTED
CapabilityFlags (0x00000140) UniqueID, RawDeviceOK
LockCount = 1

[…]

ntoskrnl!IopRestartDeviceNode+145:
*** Assertion failed: !(DeviceNode->Flags & ~(DNF_MADEUP | DNF_ENUMERATED | DNF_HAS_BOOT_CONFIG | DNF_BOOT_CONFIG_RESERVED | DNF_NO_RESOURCE_REQUIRED))
*** Source File: F:\nt\private\ntos\io\pnpsubs.c, line 5840

kd> !devobj ff327778
Device object (ff327778) is for:
0000002b \Driver\CronyxOmega DriverObject ff4ec958
Current Irp 00000000 RefCount 0 Type 00000022 Flags 00003044
DevExt ff327830 DevObjExt ff327988 DevNode ff4b5ce8
ExtensionFlags (0xa0000010) DOE_START_PENDING, DOE_RAW_FDO,
DOE_DESIGNATED_FDO
Device queue is not busy.

kd> !devnode ff4b5ce8
DevNode 0xff4b5ce8 for PDO 0xff327778
Parent 0xfcd9e868 Sibling 0xff425d88 Child 0000000000
InstancePath is “CronyxOmega\UART16750\CronyxOmega&VER_01&BOARD_00&PORT_000”
EnumerationMutex is held
Flags (0x00010010) DNF_ENUMERATED, DNF_NON_STOPPED_REBALANCE
CapabilityFlags (0x00000140) UniqueID, RawDeviceOK
LockCount = 1


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It looks like your bus driver is enumerating the PDO as a raw capable
device by setting the RawDeviceOK to TRUE in the DEVICE_CAPABILITIES and
as a result you child first gets started without the function driver,
and when the system finds the function driver it query removes and tries
to restart the device. This is a normal procedure for raw devices. You
might be doing something wrong in that sequence that leads to this
assertion.

My suggestion to you would be to set RawDeviceOK=FALSE and see what
happens. May be that would help detect the actual problem.

-Eliyas

-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Sent: Thursday, July 12, 2001 5:00 PM
To: NT Developers Interest List
Subject: [ntdev] HELP: PNP-related assertion by
DNF_NON_STOPPED_REBALANCE !?!

I developed the bus driver, which is just enumerates its devices.

After the child PDO-device has been removed by IRP_MN_REMOVE_DEVICE, the
flag DNF_NON_STOPPED_REBALANCE still present in the DevNode->Flags !

This cause an “Assertion failed” in pnpsubs.c, line 5840

So, as described in DDK, actually I does not delete the
PDO-device-object by IoDeleveDevice(), because the child-device is
physically present on the bus.

What is wrong ? Somebody can help me ?

*********************** Extraction from WinDbg log
***********************

IRP_MN_QUERY_DEVICE_RELATIONS

[…]

IRP_MN_QUERY_REMOVE_DEVICE

[…]

IRP_MN_REMOVE_DEVICE

kd> !devobj ff327778
Device object (ff327778) is for:
0000002b \Driver\CronyxOmega DriverObject ff4ec958
Current Irp 00000000 RefCount 0 Type 00000022 Flags 00003044
DevExt ff327830 DevObjExt ff327988 DevNode ff4b5ce8
ExtensionFlags (0xa0000008) DOE_REMOVE_PROCESSED, DOE_RAW_FDO,
DOE_DESIGNATED_FDO
Device queue is not busy.

kd> !devnode ff4b5ce8
DevNode 0xff4b5ce8 for PDO 0xff327778
Parent 0xfcd9e868 Sibling 0xff425d88 Child 0000000000
InstancePath is
“CronyxOmega\UART16750\CronyxOmega&VER_01&BOARD_00&PORT_000”
EnumerationMutex is held
Flags (0x00058058) DNF_PROCESSED, DNF_ENUMERATED,
DNF_ADDED, DNF_RESOURCE_REQUIREMENTS_CHANGED,
DNF_NON_STOPPED_REBALANCE, DNF_STARTED
CapabilityFlags (0x00000140) UniqueID, RawDeviceOK
LockCount = 1

[…]

ntoskrnl!IopRestartDeviceNode+145:
*** Assertion failed: !(DeviceNode->Flags & ~(DNF_MADEUP |
DNF_ENUMERATED | DNF_HAS_BOOT_CONFIG | DNF_BOOT_CONFIG_RESERVED |
DNF_NO_RESOURCE_REQUIRED))
*** Source File: F:\nt\private\ntos\io\pnpsubs.c, line 5840

kd> !devobj ff327778
Device object (ff327778) is for:
0000002b \Driver\CronyxOmega DriverObject ff4ec958
Current Irp 00000000 RefCount 0 Type 00000022 Flags 00003044
DevExt ff327830 DevObjExt ff327988 DevNode ff4b5ce8
ExtensionFlags (0xa0000010) DOE_START_PENDING, DOE_RAW_FDO,
DOE_DESIGNATED_FDO
Device queue is not busy.

kd> !devnode ff4b5ce8
DevNode 0xff4b5ce8 for PDO 0xff327778
Parent 0xfcd9e868 Sibling 0xff425d88 Child 0000000000
InstancePath is
“CronyxOmega\UART16750\CronyxOmega&VER_01&BOARD_00&PORT_000”
EnumerationMutex is held
Flags (0x00010010) DNF_ENUMERATED, DNF_NON_STOPPED_REBALANCE
CapabilityFlags (0x00000140) UniqueID, RawDeviceOK
LockCount = 1


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

On 07/13/01, ““Eliyas Yakub” ” wrote:
> It looks like your bus driver is enumerating the PDO as a raw capable
> device by setting the RawDeviceOK to TRUE in the DEVICE_CAPABILITIES and
> as a result you child first gets started without the function driver,
> and when the system finds the function driver it query removes and tries
> to restart the device. This is a normal procedure for raw devices. You
> might be doing something wrong in that sequence that leads to this
> assertion.
>
> My suggestion to you would be to set RawDeviceOK=FALSE and see what
> happens. May be that would help detect the actual problem.
>
> -Eliyas

Thank for your response.
Your solution has decided the problem.
But I think this is a small bug in W2K kernel, because on Whistler RC1 (build 2505) all OK with RawDeviceOk=true.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com