can i access the device at the device shutdown

can we do a device physical read and write operation from a lower volume filter driver when when device is going to WdfPowerDeviceD3 state.
my WdfIoTargetSendReadSynchronously actually hang in the read call.

I appreciate any help in trouble shooting this problem. thanks in advance.

regards,
Vijay

You should check to see if the target is pending the request (!wdfkd.wdfiotarget ) or if the request is pended lower in the stack

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Vijay Pothireddy
Sent: Wednesday, February 17, 2010 3:16 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] can i access the device at the device shutdown

can we do a device physical read and write operation from a lower volume filter driver when when device is going to WdfPowerDeviceD3 state.
my WdfIoTargetSendReadSynchronously actually hang in the read call.

I appreciate any help in trouble shooting this problem. thanks in advance.

regards,
Vijay


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,

thanks for the quick response , please see the values below.

kd> !WDFIOTARGET 0x7a31e4b8 f

WDFIOTARGET 7a31e4b8

WDFDEVICE: 0x7a34f8c0
Target Device: !devobj 0x850be450
Target PDO: !devobj 0x850be450

Type: Instack target
State: WdfIoTargetStarted

Requests pending: 0

Requests sent: 1
f78ea1c8 !irp 0x853f8e70
Completion routine: (00000000)
context: f78ea17c

Requests sent with ignore-target-state: 0

kd> !irp 0x853f8e70 f
Irp is active with 6 stacks 6 is current (= 0x853f8f94)
Mdl=8570a008: No System Buffer: Thread 00000000: Irp stack trace.
Flags = 00000000
ThreadListEntry.Flink = 853f8e80
ThreadListEntry.Blink = 853f8e80
IoStatus.Status = 00000000
IoStatus.Information = 00000000
RequestorMode = 00000000
Cancel = 00
CancelIrql = 0
ApcEnvironment = 00
UserIosb = 00000000
UserEvent = 00000000
Overlay.AsynchronousParameters.UserApcRoutine = 00000000
Overlay.AsynchronousParameters.UserApcContext = 00000000
Overlay.AllocationSize = 00000000 - 00000000
CancelRoutine = 00000000
UserBuffer = 00000000
&Tail.Overlay.DeviceQueueEntry = 853f8eb0
Tail.Overlay.Thread = 00000000
Tail.Overlay.AuxiliaryBuffer = 00000000
Tail.Overlay.ListEntry.Flink = 850be52c
Tail.Overlay.ListEntry.Blink = 850be52c
Tail.Overlay.CurrentStackLocation = 853f8f94
Tail.Overlay.OriginalFileObject = 00000000
Tail.Apc = 00000000
Tail.CompletionKey = 00000000
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
>[3, 0] 0 e1 850be450 00000000 80806620-85ddd278 Success Error Cancel pending
\Driver\Ftdisk nt!IopUnloadSafeCompletion
Args: 00064200 00000000 00043000 00000000

physical device object state : -

kd> !devobj 0x850be450
Device object (850be450) is for:
HarddiskVolume2 \Driver\Ftdisk DriverObject 85f72f38
Current Irp 00000000 RefCount 0 Type 00000007 Flags 00001050
Vpb 853ee978 Dacl e1332af4 DevExt 850be508 DevObjExt 850be620 Dope 85e349a8 DevNode 850972d8
ExtensionFlags (0x00000008) DOE_REMOVE_PROCESSED
AttachedDevice (Upper) 85d0f948 \Driver\ARCFlashVolDrv
Device queue is not busy.

my lower level filter device object state : -

kd> !wdfdevice 0x7a34f8c0 f

Dumping WDFDEVICE 0x7a34f8c0
=================================

WDM PDEVICE_OBJECTs:self 85d0f948, attached 850be450, pdo 850be450

Filter WDFDEVICE

Pnp state: 10e ( WdfDevStatePnpQueriedRemoving )
Power state: 314 ( WdfDevStatePowerGotoD3Stopped )
Power Pol state: 55b ( WdfDevStatePwrPolStopping )

Default WDFIOTARGET: 7a31e4b8

No pended pnp or power irps

owning thread: 85fa2db0
Pnp state history:
[0] WdfDevStatePnpHardwareAvailable (0x108)
[1] WdfDevStatePnpEnableInterfaces (0x109)
[2] WdfDevStatePnpStarted (0x119)
[3] WdfDevStatePnpQueryRemoveStaticCheck (0x10d)
[4] WdfDevStatePnpQueryRemoveAskDriver (0x10b)
[5] WdfDevStatePnpQueryRemoveEnsureDeviceAwake (0x137)
[6] WdfDevStatePnpQueryRemovePending (0x10c)
[7] WdfDevStatePnpQueriedRemoving (0x10e)

owning thread: 85fa2db0
Power state history:
[0] WdfDevStatePowerStartingCheckDeviceType (0x316)
[1] WdfDevStatePowerD0Starting (0x30f)
[2] WdfDevStatePowerD0StartingConnectInterrupt (0x310)
[3] WdfDevStatePowerD0StartingDmaEnable (0x311)
[4] WdfDevStatePowerD0StartingStartSelfManagedIo (0x312)
[5] WdfDevStatePowerDecideD0State (0x313)
[6] WdfDevStatePowerD0NP (0x8308)
[7] WdfDevStatePowerGotoD3Stopped (0x314)

owning thread: 85fa2db0
Power policy state history:
[0] WdfDevStatePwrPolObjectCreated (0x500)
[1] WdfDevStatePwrPolStarting (0x501)
[2] WdfDevStatePwrPolStarted (0x565)
[3] WdfDevStatePwrPolStartingSucceeded (0x502)
[4] WdfDevStatePwrPolStopping (0x55b)

WDFCHILDLIST Handles:
!WDFCHILDLIST 0x7ac07bc8 (static PDO list)

Properties:
SynchronizationScope: WdfSynchronizationScopeNone
ExecutionLevel: WdfExecutionLevelDispatch
IoType: WdfDeviceIoDirect
FileObjectClass: 1 ( WdfFileObjectNotRequired )
Exclusive: No
AutoForwardCleanupClose: Yes
DefaultPriorityBoost: 0

From: Doron Holan
Sent: Thursday, February 18, 2010 1:02 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] can i access the device at the device shutdown

You should check to see if the target is pending the request (!wdfkd.wdfiotarget ) or if the request is pended lower in the stack

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Vijay Pothireddy
Sent: Wednesday, February 17, 2010 3:16 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] can i access the device at the device shutdown

can we do a device physical read and write operation from a lower volume filter driver when when device is going to WdfPowerDeviceD3 state.

my WdfIoTargetSendReadSynchronously actually hang in the read call.

I appreciate any help in trouble shooting this problem. thanks in advance.

regards,

Vijay

---
NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum

---
NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum

Well, the irp is stuck in ftdisk, so ftdisk doesn't like what you are doing. You are sending the io in a remove based on a query remove, so ftdisk is changing some kind of state in query remove. The remove has not yet been sent down the stack either. Not sure why ftdisk is behaving that way.

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Vijay Pothireddy
Sent: Thursday, February 18, 2010 6:49 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] can i access the device at the device shutdown

Doron,

thanks for the quick response , please see the values below.

kd> !WDFIOTARGET 0x7a31e4b8 f

WDFIOTARGET 7a31e4b8

WDFDEVICE: 0x7a34f8c0
Target Device: !devobj 0x850be450
Target PDO: !devobj 0x850be450

Type: Instack target
State: WdfIoTargetStarted

Requests pending: 0

Requests sent: 1
f78ea1c8 !irp 0x853f8e70
Completion routine: (00000000)
context: f78ea17c

Requests sent with ignore-target-state: 0

kd> !irp 0x853f8e70 f
Irp is active with 6 stacks 6 is current (= 0x853f8f94)
Mdl=8570a008: No System Buffer: Thread 00000000: Irp stack trace.
Flags = 00000000
ThreadListEntry.Flink = 853f8e80
ThreadListEntry.Blink = 853f8e80
IoStatus.Status = 00000000
IoStatus.Information = 00000000
RequestorMode = 00000000
Cancel = 00
CancelIrql = 0
ApcEnvironment = 00
UserIosb = 00000000
UserEvent = 00000000
Overlay.AsynchronousParameters.UserApcRoutine = 00000000
Overlay.AsynchronousParameters.UserApcContext = 00000000
Overlay.AllocationSize = 00000000 - 00000000
CancelRoutine = 00000000
UserBuffer = 00000000
&Tail.Overlay.DeviceQueueEntry = 853f8eb0
Tail.Overlay.Thread = 00000000
Tail.Overlay.AuxiliaryBuffer = 00000000
Tail.Overlay.ListEntry.Flink = 850be52c
Tail.Overlay.ListEntry.Blink = 850be52c
Tail.Overlay.CurrentStackLocation = 853f8f94
Tail.Overlay.OriginalFileObject = 00000000
Tail.Apc = 00000000
Tail.CompletionKey = 00000000
cmd flg cl Device File Completion-Context
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
[0, 0] 0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
>[3, 0] 0 e1 850be450 00000000 80806620-85ddd278 Success Error Cancel pending
\Driver\Ftdisk nt!IopUnloadSafeCompletion
Args: 00064200 00000000 00043000 00000000

physical device object state : -

kd> !devobj 0x850be450
Device object (850be450) is for:
HarddiskVolume2 \Driver\Ftdisk DriverObject 85f72f38
Current Irp 00000000 RefCount 0 Type 00000007 Flags 00001050
Vpb 853ee978 Dacl e1332af4 DevExt 850be508 DevObjExt 850be620 Dope 85e349a8 DevNode 850972d8
ExtensionFlags (0x00000008) DOE_REMOVE_PROCESSED
AttachedDevice (Upper) 85d0f948 \Driver\ARCFlashVolDrv
Device queue is not busy.

my lower level filter device object state : -

kd> !wdfdevice 0x7a34f8c0 f

Dumping WDFDEVICE 0x7a34f8c0
=================================

WDM PDEVICE_OBJECTs:self 85d0f948, attached 850be450, pdo 850be450

Filter WDFDEVICE

Pnp state: 10e ( WdfDevStatePnpQueriedRemoving )
Power state: 314 ( WdfDevStatePowerGotoD3Stopped )
Power Pol state: 55b ( WdfDevStatePwrPolStopping )

Default WDFIOTARGET: 7a31e4b8

No pended pnp or power irps

owning thread: 85fa2db0
Pnp state history:
[0] WdfDevStatePnpHardwareAvailable (0x108)
[1] WdfDevStatePnpEnableInterfaces (0x109)
[2] WdfDevStatePnpStarted (0x119)
[3] WdfDevStatePnpQueryRemoveStaticCheck (0x10d)
[4] WdfDevStatePnpQueryRemoveAskDriver (0x10b)
[5] WdfDevStatePnpQueryRemoveEnsureDeviceAwake (0x137)
[6] WdfDevStatePnpQueryRemovePending (0x10c)
[7] WdfDevStatePnpQueriedRemoving (0x10e)

owning thread: 85fa2db0
Power state history:
[0] WdfDevStatePowerStartingCheckDeviceType (0x316)
[1] WdfDevStatePowerD0Starting (0x30f)
[2] WdfDevStatePowerD0StartingConnectInterrupt (0x310)
[3] WdfDevStatePowerD0StartingDmaEnable (0x311)
[4] WdfDevStatePowerD0StartingStartSelfManagedIo (0x312)
[5] WdfDevStatePowerDecideD0State (0x313)
[6] WdfDevStatePowerD0NP (0x8308)
[7] WdfDevStatePowerGotoD3Stopped (0x314)

owning thread: 85fa2db0
Power policy state history:
[0] WdfDevStatePwrPolObjectCreated (0x500)
[1] WdfDevStatePwrPolStarting (0x501)
[2] WdfDevStatePwrPolStarted (0x565)
[3] WdfDevStatePwrPolStartingSucceeded (0x502)
[4] WdfDevStatePwrPolStopping (0x55b)

WDFCHILDLIST Handles:
!WDFCHILDLIST 0x7ac07bc8 (static PDO list)

Properties:
SynchronizationScope: WdfSynchronizationScopeNone
ExecutionLevel: WdfExecutionLevelDispatch
IoType: WdfDeviceIoDirect
FileObjectClass: 1 ( WdfFileObjectNotRequired )
Exclusive: No
AutoForwardCleanupClose: Yes
DefaultPriorityBoost: 0

From: Doron Holanmailto:xxxxx
Sent: Thursday, February 18, 2010 1:02 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] can i access the device at the device shutdown

You should check to see if the target is pending the request (!wdfkd.wdfiotarget ) or if the request is pended lower in the stack

d

From: xxxxx@lists.osr.commailto:xxxxx [mailto:xxxxx@lists.osr.com] On Behalf Of Vijay Pothireddy
Sent: Wednesday, February 17, 2010 3:16 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] can i access the device at the device shutdown

can we do a device physical read and write operation from a lower volume filter driver when when device is going to WdfPowerDeviceD3 state.
my WdfIoTargetSendReadSynchronously actually hang in the read call.

I appreciate any help in trouble shooting this problem. thanks in advance.

regards,
Vijay

---
NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum

---
NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum
---
NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>