Get Notify About Sx States Changes in Kmdf

Hello.

For My Project I need to send some command to my device when the system
is going down to S3. (My Device has no Power State Dx)

Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
Parameters is the proper why for doing this?


Oren Weil

What doy oumean that your device has no power state Dx? How is the device connected to the PC? Does KMDF call EvtDeviceD0Exit for your device when the machine powers down? If you do not enable S0 idle, D0Exit will be called during system state transitions and during pnp removal. What do you need to do that is special to differentiate power down during S0 vs Sx?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Oren Weil
Sent: Sunday, September 16, 2007 12:20 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Get Notify About Sx States Changes in Kmdf

Hello.

For My Project I need to send some command to my device when the system
is going down to S3. (My Device has no Power State Dx)

Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
Parameters is the proper why for doing this?


Oren Weil


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

Hi Doron
Thanks for the relay,

My device does not have power state, I don’t need to do anything in the
hardware to start the device or to shutdown the device. But i need to
tell the device to do something (like save his data) only when the
system goes into S3.

Doron Holan wrote:

What doy oumean that your device has no power state Dx? How is the device connected to the PC? Does KMDF call EvtDeviceD0Exit for your device when the machine powers down? If you do not enable S0 idle, D0Exit will be called during system state transitions and during pnp removal. What do you need to do that is special to differentiate power down during S0 vs Sx?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Oren Weil
Sent: Sunday, September 16, 2007 12:20 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Get Notify About Sx States Changes in Kmdf

Hello.

For My Project I need to send some command to my device when the system
is going down to S3. (My Device has no Power State Dx)

Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
Parameters is the proper why for doing this?


Oren Weil


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


Oren Weil

Yes, but my point is that the device will still receive device power irps and you can easily do the same thing in EvtDeviceD0Exit without having to filter power irps directly. For KMDF v1.7, there is a new DDI, WdfDeviceGetSystemPowerAction which will give you the current Sx state in D0Exit.

d

-----Original Message-----
From: Oren Weil [mailto:xxxxx@gmail.com]
Sent: Monday, September 17, 2007 12:52 PM
To: Doron Holan
Cc: Windows System Software Devs Interest List
Subject: Re: Get Notify About Sx States Changes in Kmdf

Hi Doron
Thanks for the relay,

My device does not have power state, I don’t need to do anything in the
hardware to start the device or to shutdown the device. But i need to
tell the device to do something (like save his data) only when the
system goes into S3.

Doron Holan wrote:

What doy oumean that your device has no power state Dx? How is the device connected to the PC? Does KMDF call EvtDeviceD0Exit for your device when the machine powers down? If you do not enable S0 idle, D0Exit will be called during system state transitions and during pnp removal. What do you need to do that is special to differentiate power down during S0 vs Sx?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Oren Weil
Sent: Sunday, September 16, 2007 12:20 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Get Notify About Sx States Changes in Kmdf

Hello.

For My Project I need to send some command to my device when the system
is going down to S3. (My Device has no Power State Dx)

Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
Parameters is the proper why for doing this?


Oren Weil


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


Oren Weil

Ok, But if i will do the action in EvtDeviceD0Exit it will also do it
for S4 and S5 and I dont want/need to do the action in S4, S5 :slight_smile:

Kmdf 1.7 is include in WDK 6001?

Doron Holan wrote:

Yes, but my point is that the device will still receive device power irps and you can easily do the same thing in EvtDeviceD0Exit without having to filter power irps directly. For KMDF v1.7, there is a new DDI, WdfDeviceGetSystemPowerAction which will give you the current Sx state in D0Exit.

d

-----Original Message-----
From: Oren Weil [mailto:xxxxx@gmail.com]
Sent: Monday, September 17, 2007 12:52 PM
To: Doron Holan
Cc: Windows System Software Devs Interest List
Subject: Re: Get Notify About Sx States Changes in Kmdf

Hi Doron
Thanks for the relay,

My device does not have power state, I don’t need to do anything in the
hardware to start the device or to shutdown the device. But i need to
tell the device to do something (like save his data) only when the
system goes into S3.

Doron Holan wrote:
> What doy oumean that your device has no power state Dx? How is the device connected to the PC? Does KMDF call EvtDeviceD0Exit for your device when the machine powers down? If you do not enable S0 idle, D0Exit will be called during system state transitions and during pnp removal. What do you need to do that is special to differentiate power down during S0 vs Sx?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Oren Weil
> Sent: Sunday, September 16, 2007 12:20 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Get Notify About Sx States Changes in Kmdf
>
> Hello.
>
> For My Project I need to send some command to my device when the system
> is going down to S3. (My Device has no Power State Dx)
>
> Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
> with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
> Parameters is the proper why for doing this?
>
>
> –
> Oren Weil
>
> —
> 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
>


Oren Weil


Oren Weil

Ok, But if i will do the action in EvtDeviceD0Exit it will also do it
for S4 and S5 and I dont want/need to do the action in S4, S5 :slight_smile:

Kmdf 1.7 is include in WDK 6001?

Doron Holan wrote:

Yes, but my point is that the device will still receive device power irps and you can easily do the same thing in EvtDeviceD0Exit without having to filter power irps directly. For KMDF v1.7, there is a new DDI, WdfDeviceGetSystemPowerAction which will give you the current Sx state in D0Exit.

d

-----Original Message-----
From: Oren Weil [mailto:xxxxx@gmail.com]
Sent: Monday, September 17, 2007 12:52 PM
To: Doron Holan
Cc: Windows System Software Devs Interest List
Subject: Re: Get Notify About Sx States Changes in Kmdf

Hi Doron
Thanks for the relay,

My device does not have power state, I don’t need to do anything in the
hardware to start the device or to shutdown the device. But i need to
tell the device to do something (like save his data) only when the
system goes into S3.

Doron Holan wrote:

> What doy oumean that your device has no power state Dx? How is the device connected to the PC? Does KMDF call EvtDeviceD0Exit for your device when the machine powers down? If you do not enable S0 idle, D0Exit will be called during system state transitions and during pnp removal. What do you need to do that is special to differentiate power down during S0 vs Sx?
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Oren Weil
> Sent: Sunday, September 16, 2007 12:20 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Get Notify About Sx States Changes in Kmdf
>
> Hello.
>
> For My Project I need to send some command to my device when the system
> is going down to S3. (My Device has no Power State Dx)
>
> Is the use of the function WdfDeviceInitAssignWdmIrpPreprocessCallback()
> with IRP_MJ_POWER/IRP_MN_SET_POWER as a MajorFunction/MinorFunction
> Parameters is the proper why for doing this?
>
>
> –
> Oren Weil
>
> —
> 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
>
>


Oren Weil


Oren Weil