public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
To: "Li, Shaohua" <shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: PCI power state mapping
Date: Tue, 27 Jul 2004 20:18:01 +0200	[thread overview]
Message-ID: <41069C59.5020603@drzeus.cx> (raw)
In-Reply-To: <B44D37711ED29844BEA67908EAF36F036BCB8C-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Hi,
I'm still learning the structure of the linux kernel so I wasn't aware 
that there was a device layer above the drivers. I figured that devices 
that weren't claimed by any driver were just ignored :)

Anyhow, I did some hacks into pci_device_suspend() getting it to suspend 
devices without a driver. Combined with my escalation patch in 
pci_set_power_state() all devices on the machine now enters D2 or D3 
depending on device capabilities. My laptop still cannot enter the 
suspend state so there is still something missing... Are there any more 
areas of power management in linux that aren't quite up to spec.?

When it comes to ACPI to PCI mapping, one immediately wonders how 
Windows handles this. I only see one option and that is comparing 
allocated resources. But that assumes that the driver assumes resources 
identically to how the guy writing the DSDT. Does anyone here have 
insight into how Windows does this?

In my attempts to fiddle with PCI power states I also tried using 
/sys/devices/pci*/*/power/state but nothing happens when writing values 
to this file. Where in the kernel is this file attached?

Rgds
Pierre Ossman

Li, Shaohua wrote:

>Hi,
>I agree with what you said. Currently most drivers will directly send
>'PM_*" state to 'pci_set_power_state', which cause many drivers can't
>suspend. I found my two laptops, Toshiba Satellite M20 and Thinkpad T40,
>EHCI can't suspend and the reason is exactly they only support D3 state
>but 'PM_SUSPEND_MEM' equals to 2.
>
>I suggest that 'pci_set_power_state' should be called in
>'pci_device_suspend', so even a device has no driver, it gets a chance
>to sleep. I have a sample patch for it actually, but it still uses wrong
>D-state number ('PM_*').
> 
>For determining D-state of a device in sleep state, bind guess is not a
>good idea. Some devices only support D3 or D2 for S3. ACPI defined
>methods _SxD, which return maximum device's D-state when entering Sx.
>But it's not easy to find a clean way to relate ACPI devices with PCI
>devices.
>
>Thanks,
>Shaohua
>
>  
>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click

  parent reply	other threads:[~2004-07-27 18:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-27  7:10 PCI power state mapping Li, Shaohua
     [not found] ` <B44D37711ED29844BEA67908EAF36F036BCB8C-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-07-27 18:18   ` Pierre Ossman [this message]
     [not found]     ` <41069C59.5020603-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
2004-07-29  8:41       ` Pavel Machek
     [not found]         ` <20040729084154.GH21889-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2004-07-29 10:47           ` Pierre Ossman
     [not found]             ` <4108D5BC.8040302-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
2004-07-29 10:52               ` Pavel Machek
     [not found]                 ` <20040729105251.GB9718-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-07-29 11:15                   ` Pierre Ossman
     [not found]                     ` <4108DC59.4050409-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
2004-07-29 11:23                       ` Pavel Machek
     [not found]                         ` <20040729112359.GD9718-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-07-29 11:45                           ` Pierre Ossman
     [not found]                             ` <4108E365.30204-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
2004-07-29 12:26                               ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2004-07-26 15:53 Pierre Ossman
     [not found] ` <410528F5.1060104-p3sGCRWkH8CeZLLa646FqQ@public.gmane.org>
2004-08-16  9:04   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41069C59.5020603@drzeus.cx \
    --to=drzeus-list-p3sgcrwkh8cezlla646fqq@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox