PCI power management

Hi,

My PCI driver, after Stand by/Resume, seems to lose the communication with
the HW. I try to read some HW registers, but only 0xFFFF is retumed. Is
there anything I miss? Where shall I start to debug my driver (power.c)?

Thanks

Ta H.


MSN Toolbar provides one-click access to Hotmail from any Web page – FREE
download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

I think you need to make sure the following:

  1. you provide correct device capability in response to an
    IRP_MN_QUERY_CAPABILITIES, especially the DEVICE_POWER_STATE
    DeviceState[PowerSystemMaximum] arrary.

  2. you request the correct device power state (PoRequestPowerIrp) while
    handling a system power IRP.

  3. don’t forget to pass the Power Irp down. PCI.sys must received and
    processed the set_D0 device Irp first before you can touch the HW.

Good luck,

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Ta H. [mailto:xxxxx@hotmail.com]
Sent: Friday, March 19, 2004 10:23 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PCI power management

Hi,

My PCI driver, after Stand by/Resume, seems to lose the
communication with
the HW. I try to read some HW registers, but only 0xFFFF is
retumed. Is
there anything I miss? Where shall I start to debug my
driver (power.c)?

Thanks

Ta H.


MSN Toolbar provides one-click access to Hotmail from any Web
page - FREE
download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Sounds like your device is uninitialized. Is the PCI config registers
programmed at all?

It may of course be some sort of HW state that gets clobbered, but I’d guess
that your device has either changed address (i.e. the HW registers are now
somewhere completely different from where they were before you got
stand-by’d), or that the HW is not initialized at all, and thus doesn’t
respond correctly to the PCI access.

Try “!pci 1 0” (or just plain !pci) in WinDBG, it should be able to tell you
where your device is and what settings are. Most important, does anything
change from before and after standby?

If your device is behind a bridge of some sort, you may need to supply the
PCI bus number to !pci. Check the help for !pci if you want more info.


Mats

-----Original Message-----
From: Ta H. [mailto:xxxxx@hotmail.com]
Sent: Friday, March 19, 2004 3:23 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] PCI power management

Hi,

My PCI driver, after Stand by/Resume, seems to lose the
communication with
the HW. I try to read some HW registers, but only 0xFFFF is
retumed. Is
there anything I miss? Where shall I start to debug my
driver (power.c)?

Thanks

Ta H.


MSN Toolbar provides one-click access to Hotmail from any Web
page - FREE
download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thanks for your prompt reply.

I wonder how I re-initialize my PCI device after Stand-by/Resume? Or how do
I prevent the PCI addresses of my device from changing after
Stand-by/Resume?

I gather I must have missed something in my “power.c”.

Ta H.

From: xxxxx@3Dlabs.com
Reply-To: “Windows System Software Devs Interest List”

>To: “Windows System Software Devs Interest List”
>Subject: RE: [ntdev] PCI power management
>Date: Fri, 19 Mar 2004 16:30:24 -0000
>
>Sounds like your device is uninitialized. Is the PCI config registers
>programmed at all?
>
>It may of course be some sort of HW state that gets clobbered, but I’d
>guess
>that your device has either changed address (i.e. the HW registers are now
>somewhere completely different from where they were before you got
>stand-by’d), or that the HW is not initialized at all, and thus doesn’t
>respond correctly to the PCI access.
>
>Try “!pci 1 0” (or just plain !pci) in WinDBG, it should be able to tell
>you
>where your device is and what settings are. Most important, does anything
>change from before and after standby?
>
>If your device is behind a bridge of some sort, you may need to supply the
>PCI bus number to !pci. Check the help for !pci if you want more info.
>
>–
>Mats
>
> > -----Original Message-----
> > From: Ta H. [mailto:xxxxx@hotmail.com]
> > Sent: Friday, March 19, 2004 3:23 PM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] PCI power management
> >
> >
> > Hi,
> >
> > My PCI driver, after Stand by/Resume, seems to lose the
> > communication with
> > the HW. I try to read some HW registers, but only 0xFFFF is
> > retumed. Is
> > there anything I miss? Where shall I start to debug my
> > driver (power.c)?
> >
> > Thanks
> >
> > Ta H.
> >
> >
> > MSN Toolbar provides one-click access to Hotmail from any Web
> > page - FREE
> > download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@3dlabs.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@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com


Get rid of annoying pop-up ads with the new MSN Toolbar – FREE!
http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/

If the PCI resources (mem/io) changed as a result of resource rebalancing,
the PNP manager must send you a MN_START_DEVICE unless the resources were
“clobbered” from PCI config space after resume.

Restoring PCI configuration is done by the pci bus driver. Your driver
doesn’t need to do that in Windows. In order for bus driver to correctly
configure you dev, you must handle power IRP correctly. For instance, you
request correct device power state corresponding to a system power state.

I gather I must have missed something in my “power.c”.

Take a close look at how you response to MN_QUERY_DEVICE_CAP and how you
Request device power IRP.

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Ta H. [mailto:xxxxx@hotmail.com]
Sent: Friday, March 19, 2004 12:28 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PCI power management

Thanks for your prompt reply.

I wonder how I re-initialize my PCI device after
Stand-by/Resume? Or how do
I prevent the PCI addresses of my device from changing after
Stand-by/Resume?

Ta H.

>From: xxxxx@3Dlabs.com
>Reply-To: “Windows System Software Devs Interest List”
>
> >To: “Windows System Software Devs Interest List”
>
> >Subject: RE: [ntdev] PCI power management
> >Date: Fri, 19 Mar 2004 16:30:24 -0000
> >
> >Sounds like your device is uninitialized. Is the PCI config registers
> >programmed at all?
> >
> >It may of course be some sort of HW state that gets
> clobbered, but I’d
> >guess
> >that your device has either changed address (i.e. the HW
> registers are now
> >somewhere completely different from where they were before you got
> >stand-by’d), or that the HW is not initialized at all, and
> thus doesn’t
> >respond correctly to the PCI access.
> >
> >Try “!pci 1 0” (or just plain !pci) in WinDBG, it should be
> able to tell
> >you
> >where your device is and what settings are. Most important,
> does anything
> >change from before and after standby?
> >
> >If your device is behind a bridge of some sort, you may need
> to supply the
> >PCI bus number to !pci. Check the help for !pci if you want
> more info.
> >
> >–
> >Mats
> >
> > > -----Original Message-----
> > > From: Ta H. [mailto:xxxxx@hotmail.com]
> > > Sent: Friday, March 19, 2004 3:23 PM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] PCI power management
> > >
> > >
> > > Hi,
> > >
> > > My PCI driver, after Stand by/Resume, seems to lose the
> > > communication with
> > > the HW. I try to read some HW registers, but only 0xFFFF is
> > > retumed. Is
> > > there anything I miss? Where shall I start to debug my
> > > driver (power.c)?
> > >
> > > Thanks
> > >
> > > Ta H.
> > >
> > >
> > > MSN Toolbar provides one-click access to Hotmail from any Web
> > > page - FREE
> > > download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as:
> xxxxx@3dlabs.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@hotmail.com
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

> Get rid of annoying pop-up ads with the new MSN Toolbar - FREE!
> http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

PCI.sys takes care of these things for you. My guess is that your device
got reset and it stopped responding somehow. The advice that you got from
the other folks for debugging is good.

  • Jake

“Ta H.” wrote in message news:xxxxx@ntdev…
> Thanks for your prompt reply.
>
> I wonder how I re-initialize my PCI device after Stand-by/Resume? Or how
> do I prevent the PCI addresses of my device from changing after
> Stand-by/Resume?
>
> I gather I must have missed something in my “power.c”.
>
> Ta H.
>
>
>>From: xxxxx@3Dlabs.com
>>Reply-To: “Windows System Software Devs Interest List”
>>
>>To: “Windows System Software Devs Interest List”
>>Subject: RE: [ntdev] PCI power management
>>Date: Fri, 19 Mar 2004 16:30:24 -0000
>>
>>Sounds like your device is uninitialized. Is the PCI config registers
>>programmed at all?
>>
>>It may of course be some sort of HW state that gets clobbered, but I’d
>>guess
>>that your device has either changed address (i.e. the HW registers are now
>>somewhere completely different from where they were before you got
>>stand-by’d), or that the HW is not initialized at all, and thus doesn’t
>>respond correctly to the PCI access.
>>
>>Try “!pci 1 0” (or just plain !pci) in WinDBG, it should be able to tell
>>you
>>where your device is and what settings are. Most important, does anything
>>change from before and after standby?
>>
>>If your device is behind a bridge of some sort, you may need to supply the
>>PCI bus number to !pci. Check the help for !pci if you want more info.
>>
>>–
>>Mats
>>
>> > -----Original Message-----
>> > From: Ta H. [mailto:xxxxx@hotmail.com]
>> > Sent: Friday, March 19, 2004 3:23 PM
>> > To: Windows System Software Devs Interest List
>> > Subject: [ntdev] PCI power management
>> >
>> >
>> > Hi,
>> >
>> > My PCI driver, after Stand by/Resume, seems to lose the
>> > communication with
>> > the HW. I try to read some HW registers, but only 0xFFFF is
>> > retumed. Is
>> > there anything I miss? Where shall I start to debug my
>> > driver (power.c)?
>> >
>> > Thanks
>> >
>> > Ta H.
>> >
>> >
>> > MSN Toolbar provides one-click access to Hotmail from any Web
>> > page - FREE
>> > download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
>> >
>> >
>> > —
>> > Questions? First check the Kernel Driver FAQ at
>> > http://www.osronline.com/article.cfm?id=256
>> >
>> > You are currently subscribed to ntdev as: xxxxx@3dlabs.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@hotmail.com
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

> Get rid of annoying pop-up ads with the new MSN Toolbar - FREE!
> http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/
>
>