IRP_MN_SET_POWER Problem

Hello,

While testing my Win2K Bus Driver, I found that when I shutdown the system,
my Bus Driver would get IRP_MN_SET_POWER on the Bus FDO with

stack->Parameters.Power.Type = SystemPowerState and
stack->Parameters.Power.State = PowerSystemShutdown

and the shutdown would go through fine.

Now my Bus Driver is modified such that, I have a compute-bound thread
running at LOW_REALTIME_PRIORITY and affinity set to CPU 3. This change
causes the system to (appear to) hang on shutdown. I noticed that my Bus
Driver is not getting the IRP_MN_SET_POWER as earlier.

Could somebody throw light on why IRP_MN_SET_POWER is not being sent to my
Driver or why it is not being able to receive it ?

Do I need to set DeviceWake flag or something in the DEVICE_CAPABILITIES
structure - would this make a difference (its not clear to me if setting
this flag will enable a signal to be sent to my RT thread or not) ?

Any help is greatly appreciated.

Thanks much,
Puja

I don’t think your driver not getting a IRP_MN_SET_POWER has anything to do
with a worker thread. Are you sure that your driver works without just that
extra worker thread? Then quite likely that some thing you do in your
shutdown handler causes the thread to freak out leading to a system hang,
because if you register for shutdown notification then my experiments has
shown that shutdown handler gets called before D3 set power request from the
Power manager.

-Eliyas

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Wednesday, June 28, 2000 1:46 PM
To: NT Developers Interest List
Subject: [ntdev] IRP_MN_SET_POWER Problem

Hello,

While testing my Win2K Bus Driver, I found that when I shutdown the system,
my Bus Driver would get IRP_MN_SET_POWER on the Bus FDO with

stack->Parameters.Power.Type = SystemPowerState and
stack->Parameters.Power.State = PowerSystemShutdown

and the shutdown would go through fine.

Now my Bus Driver is modified such that, I have a compute-bound thread
running at LOW_REALTIME_PRIORITY and affinity set to CPU 3. This change
causes the system to (appear to) hang on shutdown. I noticed that my Bus
Driver is not getting the IRP_MN_SET_POWER as earlier.

Could somebody throw light on why IRP_MN_SET_POWER is not being sent to my
Driver or why it is not being able to receive it ?

Do I need to set DeviceWake flag or something in the DEVICE_CAPABILITIES
structure - would this make a difference (its not clear to me if setting
this flag will enable a signal to be sent to my RT thread or not) ?

Any help is greatly appreciated.

Thanks much,
Puja


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Eliyas/Max,

An earlier post by Max (subject “Re:Bus Driver: handling IRP_MJ_SHUTDOWN”,
date 6/16/2000) suggests that IRP_MJ_SHUTDOWN is obsolete (although I didn’t
find any mention of this in the DDK). Isn’t this the case where you register
for shutdown notification ?

Eliyas, from what you say, does it mean that IRP_MJ_SHUTDOWN is NOT obsolete ?
So BOTH shutdown notification AND power-IRP will be sent to the driver during
shutdown ?

Please clarify.

Thanks,
Puja

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Eliyas Yakub
Sent: Thursday, June 29, 2000 12:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: IRP_MN_SET_POWER Problem

I don’t think your driver not getting a IRP_MN_SET_POWER has anything to do
with a worker thread. Are you sure that your driver works without just that
extra worker thread? Then quite likely that some thing you do in your
shutdown handler causes the thread to freak out leading to a system hang,
because if you register for shutdown notification then my experiments has
shown that shutdown handler gets called before D3 set power request from
the
Power manager.

-Eliyas

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Wednesday, June 28, 2000 1:46 PM
To: NT Developers Interest List
Subject: [ntdev] IRP_MN_SET_POWER Problem

Hello,

While testing my Win2K Bus Driver, I found that when I shutdown the system,

my Bus Driver would get IRP_MN_SET_POWER on the Bus FDO with

stack->Parameters.Power.Type = SystemPowerState and
stack->Parameters.Power.State = PowerSystemShutdown

and the shutdown would go through fine.

Now my Bus Driver is modified such that, I have a compute-bound thread
running at LOW_REALTIME_PRIORITY and affinity set to CPU 3. This change
causes the system to (appear to) hang on shutdown. I noticed that my Bus
Driver is not getting the IRP_MN_SET_POWER as earlier.

Could somebody throw light on why IRP_MN_SET_POWER is not being sent to my
Driver or why it is not being able to receive it ?

Do I need to set DeviceWake flag or something in the DEVICE_CAPABILITIES
structure - would this make a difference (its not clear to me if setting
this flag will enable a signal to be sent to my RT thread or not) ?

Any help is greatly appreciated.

Thanks much,
Puja


Get free email and a permanent address at http://www.amexmail.com/?A=1

> BOTH shutdown notification AND power-IRP will be sent to the driver during
shutdown ?

Yes. I might have missed Max response but AFIK shutdown is not obsolete. I
don’t think any of our documentation says so.

-Eliyas

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Friday, June 30, 2000 1:35 AM
To: xxxxx@lists.osr.com; Eliyas Yakub; xxxxx@storagecraft.com
Subject: RE: IRP_MN_SET_POWER Problem

Eliyas/Max,

An earlier post by Max (subject “Re:Bus Driver: handling IRP_MJ_SHUTDOWN”,
date 6/16/2000) suggests that IRP_MJ_SHUTDOWN is obsolete (although I didn’t
find any mention of this in the DDK). Isn’t this the case where you
register
for shutdown notification ?

Eliyas, from what you say, does it mean that IRP_MJ_SHUTDOWN is NOT obsolete
?
So BOTH shutdown notification AND power-IRP will be sent to the driver
during
shutdown ?

Please clarify.

Thanks,
Puja

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Eliyas Yakub
Sent: Thursday, June 29, 2000 12:00 PM
To: NT Developers Interest List
Subject: [ntdev] RE: IRP_MN_SET_POWER Problem

I don’t think your driver not getting a IRP_MN_SET_POWER has anything to
do
with a worker thread. Are you sure that your driver works without just
that
extra worker thread? Then quite likely that some thing you do in your
shutdown handler causes the thread to freak out leading to a system hang,
because if you register for shutdown notification then my experiments has
shown that shutdown handler gets called before D3 set power request from
the
Power manager.

-Eliyas

-----Original Message-----
From: xxxxx@usa.net [mailto:xxxxx@usa.net]
Sent: Wednesday, June 28, 2000 1:46 PM
To: NT Developers Interest List
Subject: [ntdev] IRP_MN_SET_POWER Problem

Hello,

While testing my Win2K Bus Driver, I found that when I shutdown the
system,

my Bus Driver would get IRP_MN_SET_POWER on the Bus FDO with

stack->Parameters.Power.Type = SystemPowerState and
stack->Parameters.Power.State = PowerSystemShutdown

and the shutdown would go through fine.

Now my Bus Driver is modified such that, I have a compute-bound thread
running at LOW_REALTIME_PRIORITY and affinity set to CPU 3. This change
causes the system to (appear to) hang on shutdown. I noticed that my Bus
Driver is not getting the IRP_MN_SET_POWER as earlier.

Could somebody throw light on why IRP_MN_SET_POWER is not being sent to my

Driver or why it is not being able to receive it ?

Do I need to set DeviceWake flag or something in the DEVICE_CAPABILITIES
structure - would this make a difference (its not clear to me if setting
this flag will enable a signal to be sent to my RT thread or not) ?

Any help is greatly appreciated.

Thanks much,
Puja


Get free email and a permanent address at http://www.amexmail.com/?A=1

> date 6/16/2000) suggests that IRP_MJ_SHUTDOWN is obsolete (although I

Sorry. I have heard “IRP_MJ_SHUTDOWN is obsolete” several months (a year?)
ago on this forum.

The cite from w2k DDK:

"IRP_MJ_SHUTDOWN for any non-PnP driver that should be called before the
system itself is shut down
A PnP driver can perform shutdown-related actions when it receives the
IRP_MJ_POWER request from the Power Manager. See the Setup, PnP, Power
Management Design Guide for more information. "

Eliyas, is this cite enough to say that IRP_MJ_SHUTDOWN is obsolete at least
for PnP drivers?
All PnP/WDM samples I saw use power IRPs to shut down the device, not
IRP_MJ_SHUTDOWN.

Max