public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: "Jeffrey W. Baker" <jwbaker@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Put unused PCI devices in D3
Date: Tue, 30 Sep 2008 01:09:23 +0100	[thread overview]
Message-ID: <20080930000923.GA29775@srcf.ucam.org> (raw)
In-Reply-To: <1222719064.19236.129.camel@squeak.gghcwest.com>

On Mon, Sep 29, 2008 at 01:11:03PM -0700, Jeffrey W. Baker wrote:

> Currently it looks to me from browsing the code that D3 is only used in
> Linux when the whole machine is headed for S3, and the drivers are asked
> to suspend.  I think the drivers should be able to enter D3 in other
> circumstances:
> 
> * During pci_unregister_driver ... i.e. on module unload

The fact that Linux isn't using a device doesn't inherently mean that 
the system isn't using it. For example, the smbus controller will 
probably still be used by ACPI even if there's no Linux driver loaded.

> * When a network interface is downed

Yes. Drivers are moving towards this model.

> * If the device is a bridge or hub with no downstream device

Potential problems with hotplugging? But sure, this kind of thing is 
being implemented in USB and SCSI.

> * Whenever userspace requests D3 via sysfs

This functionality was explicitly removed a few years back.

> So, what fundamental problem prevents me from, for example, calling
> pci_set_power_state() from ohci1394's __exit?

Nothing I'm aware of. It sounds pretty safe in that case. But that would 
require you to load and unload the driver - better to have the driver 
loaded the entire time and make sure it does as much runtime power 
management as possible. I don't know enough about the firewire OHCI 
hardware, but can you power down most of the chip and still get hotplug 
events?
-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2008-09-30  0:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-29 20:11 Put unused PCI devices in D3 Jeffrey W. Baker
2008-09-30  0:09 ` Matthew Garrett [this message]
2008-09-30  0:55   ` Jeffrey W. Baker
2008-09-30  1:06     ` Matthew Garrett
2008-10-03 19:40     ` Pavel Machek
2008-10-03 19:37 ` 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=20080930000923.GA29775@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=jwbaker@gmail.com \
    --cc=linux-kernel@vger.kernel.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