Power Management on Win98

Hi All,
I am developing a WDM USB client driver.
I am facing this peculiar problem when testing my driver on 98.

When my system goes into standby with my driver loaded, I recieve System
power Irp for which I request device power Irp’s.
But device power Irp’s are never sent to the driver. This happens only
on 98 while it works for 2K /XP.

and other problem is at times my system goes into standby and comes back
immidiately, because my driver will receive a remove_device Irp and
hence driver is unloaded and reloaded again.
Is is this expected behaviour under 98 ??

TIA
Rahul Gupta

----- Original Message -----
From: “rahul gupta”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, February 25, 2004 9:52 AM
Subject: [ntdev] Power Management on Win98

> Hi All,
> I am developing a WDM USB client driver.
> I am facing this peculiar problem when testing my driver on 98.
>
> When my system goes into standby with my driver loaded, I recieve System
> power Irp for which I request device power Irp’s.
> But device power Irp’s are never sent to the driver. This happens only
> on 98 while it works for 2K /XP.
>
> and other problem is at times my system goes into standby and comes back
> immidiately, because my driver will receive a remove_device Irp and
> hence driver is unloaded and reloaded again.
> Is is this expected behaviour under 98 ??
>
> TIA
> Rahul Gupta
>
[snip]

I remember my 1394 driver on Win98SE would unload when the system went to a
lower power state and reload thereafter, until I made sure that all device
objects in the stack had the flag DO_POWER_PAGABLE (including the PDO
created by the 1394bus.sys driver, don’t remember if it was put there by the
bus driver or not). Once all device objects in the stack had this flag set,
then the problem disappeared, and all power IRPs were received as expected.
I wanted to mention this as you said that you were receiving
IRP_MN_REMOVE_DEVICE. HTH.

Philip Lukidis

Hi,
Well I am setting the DO_POWER_PAGABLE flag in my driver and I usb
client driver. Now how do I ensure everybody in the driver stack has the
DO_POWER_PAGABLE FLAG set…

I was also reading oney’s notes on WIN98 compatibility. But some how
that solution wherein the driver irp’s are not requested at all does not
work for me.

TIA for any clues …
Rahul

On Wed, 2004-02-25 at 20:10, Philip Lukidis wrote:

----- Original Message -----
From: “rahul gupta”
> To: “Windows System Software Devs Interest List”
> Sent: Wednesday, February 25, 2004 9:52 AM
> Subject: [ntdev] Power Management on Win98
>
>
> > Hi All,
> > I am developing a WDM USB client driver.
> > I am facing this peculiar problem when testing my driver on 98.
> >
> > When my system goes into standby with my driver loaded, I recieve System
> > power Irp for which I request device power Irp’s.
> > But device power Irp’s are never sent to the driver. This happens only
> > on 98 while it works for 2K /XP.
> >
> > and other problem is at times my system goes into standby and comes back
> > immidiately, because my driver will receive a remove_device Irp and
> > hence driver is unloaded and reloaded again.
> > Is is this expected behaviour under 98 ??
> >
> > TIA
> > Rahul Gupta
> >
> [snip]
>
> I remember my 1394 driver on Win98SE would unload when the system went to a
> lower power state and reload thereafter, until I made sure that all device
> objects in the stack had the flag DO_POWER_PAGABLE (including the PDO
> created by the 1394bus.sys driver, don’t remember if it was put there by the
> bus driver or not). Once all device objects in the stack had this flag set,
> then the problem disappeared, and all power IRPs were received as expected.
> I wanted to mention this as you said that you were receiving
> IRP_MN_REMOVE_DEVICE. HTH.
>
> Philip Lukidis
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Are you handling the QUERY_CAPABILITIES PNP Irp. You should handle this.
When you send this Irp down the stack and it completes, check for the
capabilities provided to you by your bus driver. On the way up you can make
changes to certain fields, based on the capabilities of your device. But
there are some strict rules to follow. Look at the DDK documentation for
handling this Irp.

Dayalan

----- Original Message -----
From: “rahul gupta”
To: “Windows System Software Devs Interest List”
Sent: Thursday, February 26, 2004 9:27 PM
Subject: Re: [ntdev] Power Management on Win98

> Hi,
> Well I am setting the DO_POWER_PAGABLE flag in my driver and I usb
> client driver. Now how do I ensure everybody in the driver stack has the
> DO_POWER_PAGABLE FLAG set…
>
> I was also reading oney’s notes on WIN98 compatibility. But some how
> that solution wherein the driver irp’s are not requested at all does not
> work for me.
>
>
> TIA for any clues …
> Rahul
>
>
>
> On Wed, 2004-02-25 at 20:10, Philip Lukidis wrote:
> > ----- Original Message -----
> > From: “rahul gupta”
> > To: “Windows System Software Devs Interest List”
> > Sent: Wednesday, February 25, 2004 9:52 AM
> > Subject: [ntdev] Power Management on Win98
> >
> >
> > > Hi All,
> > > I am developing a WDM USB client driver.
> > > I am facing this peculiar problem when testing my driver on 98.
> > >
> > > When my system goes into standby with my driver loaded, I recieve
System
> > > power Irp for which I request device power Irp’s.
> > > But device power Irp’s are never sent to the driver. This happens only
> > > on 98 while it works for 2K /XP.
> > >
> > > and other problem is at times my system goes into standby and comes
back
> > > immidiately, because my driver will receive a remove_device Irp and
> > > hence driver is unloaded and reloaded again.
> > > Is is this expected behaviour under 98 ??
> > >
> > > TIA
> > > Rahul Gupta
> > >
> > [snip]
> >
> > I remember my 1394 driver on Win98SE would unload when the system went
to a
> > lower power state and reload thereafter, until I made sure that all
device
> > objects in the stack had the flag DO_POWER_PAGABLE (including the PDO
> > created by the 1394bus.sys driver, don’t remember if it was put there by
the
> > bus driver or not). Once all device objects in the stack had this flag
set,
> > then the problem disappeared, and all power IRPs were received as
expected.
> > I wanted to mention this as you said that you were receiving
> > IRP_MN_REMOVE_DEVICE. HTH.
> >
> > Philip Lukidis
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@moschip.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Yups I am handling QueryCap sending it down … getting Cappabilities …
there in …
Though I can change the DevCap , but the point is I am not recieving any
device IRP’s though I am requesting them and infact PoRequest() return
pending (which is success).
But to my dismay they never come … Device Irp’s

Just to Add … this is happening on 98 only.

TIA
Rahul

On Fri, 2004-02-27 at 09:48, Deenadayalan wrote:

Are you handling the QUERY_CAPABILITIES PNP Irp. You should handle this.
When you send this Irp down the stack and it completes, check for the
capabilities provided to you by your bus driver. On the way up you can make
changes to certain fields, based on the capabilities of your device. But
there are some strict rules to follow. Look at the DDK documentation for
handling this Irp.

Dayalan

----- Original Message -----
From: “rahul gupta”
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, February 26, 2004 9:27 PM
> Subject: Re: [ntdev] Power Management on Win98
>
>
> > Hi,
> > Well I am setting the DO_POWER_PAGABLE flag in my driver and I usb
> > client driver. Now how do I ensure everybody in the driver stack has the
> > DO_POWER_PAGABLE FLAG set…
> >
> > I was also reading oney’s notes on WIN98 compatibility. But some how
> > that solution wherein the driver irp’s are not requested at all does not
> > work for me.
> >
> >
> > TIA for any clues …
> > Rahul
> >
> >
> >
> > On Wed, 2004-02-25 at 20:10, Philip Lukidis wrote:
> > > ----- Original Message -----
> > > From: “rahul gupta”
> > > To: “Windows System Software Devs Interest List”
> > > Sent: Wednesday, February 25, 2004 9:52 AM
> > > Subject: [ntdev] Power Management on Win98
> > >
> > >
> > > > Hi All,
> > > > I am developing a WDM USB client driver.
> > > > I am facing this peculiar problem when testing my driver on 98.
> > > >
> > > > When my system goes into standby with my driver loaded, I recieve
> System
> > > > power Irp for which I request device power Irp’s.
> > > > But device power Irp’s are never sent to the driver. This happens only
> > > > on 98 while it works for 2K /XP.
> > > >
> > > > and other problem is at times my system goes into standby and comes
> back
> > > > immidiately, because my driver will receive a remove_device Irp and
> > > > hence driver is unloaded and reloaded again.
> > > > Is is this expected behaviour under 98 ??
> > > >
> > > > TIA
> > > > Rahul Gupta
> > > >
> > > [snip]
> > >
> > > I remember my 1394 driver on Win98SE would unload when the system went
> to a
> > > lower power state and reload thereafter, until I made sure that all
> device
> > > objects in the stack had the flag DO_POWER_PAGABLE (including the PDO
> > > created by the 1394bus.sys driver, don’t remember if it was put there by
> the
> > > bus driver or not). Once all device objects in the stack had this flag
> set,
> > > then the problem disappeared, and all power IRPs were received as
> expected.
> > > I wanted to mention this as you said that you were receiving
> > > IRP_MN_REMOVE_DEVICE. HTH.
> > >
> > > Philip Lukidis
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@moschip.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
> To unsubscribe send a blank email to xxxxx@lists.osr.com

----- Original Message -----
From: “rahul gupta”
To: “Windows System Software Devs Interest List”
Sent: Thursday, February 26, 2004 10:57 AM
Subject: Re: [ntdev] Power Management on Win98

> Hi,
> Well I am setting the DO_POWER_PAGABLE flag in my driver and I usb
> client driver. Now how do I ensure everybody in the driver stack has the
> DO_POWER_PAGABLE FLAG set…
>
> I was also reading oney’s notes on WIN98 compatibility. But some how
> that solution wherein the driver irp’s are not requested at all does not
> work for me.
>
>
> TIA for any clues …
> Rahul
>
[snip]

If I remember properly, I had a particular problem in Win98se, where the
1394 bus driver was not setting the DO_POWER_PAGABLE flag in the PDO which
it created. So for Win98SE and ME, I set the flag of the PDO in AddDevice.
If this flag was not set, then the driver was actually unloaded
(IRP_MN_REMOVE_DEVICE) when the system went down to a lower power state. I
don’t remember which if any power IRPs my driver received in Win98se prior
to the flag adjustment. When I put in the flag, then all worked as it did
on Win2k and WinXP. As for all members of your stack, I can’t give a 100%
airtight answer. Filters are supposed to acquire the same I/O and power
flags as the device object directly beneath them. But can a filter below
you (and above the bus driver) acquire the same flags in the PDO before you
set the DO_POWER_PAGABLE flag in the PDO? I don’t know.

Philip Lukidis

Thanks philip & list !
It worked …

Regards
Rahul Gupta

On Fri, 2004-02-27 at 18:50, Philip Lukidis wrote:

----- Original Message -----
From: “rahul gupta”
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, February 26, 2004 10:57 AM
> Subject: Re: [ntdev] Power Management on Win98
>
>
> > Hi,
> > Well I am setting the DO_POWER_PAGABLE flag in my driver and I usb
> > client driver. Now how do I ensure everybody in the driver stack has the
> > DO_POWER_PAGABLE FLAG set…
> >
> > I was also reading oney’s notes on WIN98 compatibility. But some how
> > that solution wherein the driver irp’s are not requested at all does not
> > work for me.
> >
> >
> > TIA for any clues …
> > Rahul
> >
> [snip]
>
> If I remember properly, I had a particular problem in Win98se, where the
> 1394 bus driver was not setting the DO_POWER_PAGABLE flag in the PDO which
> it created. So for Win98SE and ME, I set the flag of the PDO in AddDevice.
> If this flag was not set, then the driver was actually unloaded
> (IRP_MN_REMOVE_DEVICE) when the system went down to a lower power state. I
> don’t remember which if any power IRPs my driver received in Win98se prior
> to the flag adjustment. When I put in the flag, then all worked as it did
> on Win2k and WinXP. As for all members of your stack, I can’t give a 100%
> airtight answer. Filters are supposed to acquire the same I/O and power
> flags as the device object directly beneath them. But can a filter below
> you (and above the bus driver) acquire the same flags in the PDO before you
> set the DO_POWER_PAGABLE flag in the PDO? I don’t know.
>
> Philip Lukidis
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@dcmtech.co.in
> To unsubscribe send a blank email to xxxxx@lists.osr.com