public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Adam Belay <abelay@novell.com>
Cc: Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
	Len Brown <len.brown@intel.com>
Subject: Re: [PATCH  6/9] PCI PM: call platform helpers properly
Date: Tue, 06 Jun 2006 10:31:14 +1000	[thread overview]
Message-ID: <1149553874.559.2.camel@localhost.localdomain> (raw)
In-Reply-To: <1149497171.7831.160.camel@localhost.localdomain>


> -	pci_write_config_word(dev, pm->pm_offset + PCI_PM_CTRL, pmcsr);
> +	/* call platform helpers (e.g. ACPI) before restoring power */
> +	if (state == PCI_D0 && platform_pci_set_power_state)
> +		platform_pci_set_power_state(dev, state);

I think the platform helper need to be able to either return from the
function directly or at least you should read back the state before
continuing. The platform helper may call into firmware which might
handle the complete state transition. Thus, when you come back from it,
you probably need to check the device-state, or provide return codes for
the platform helper to affect the code flow of the rest of the function.

Ben.



  reply	other threads:[~2006-06-06  0:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-05  8:46 [PATCH 6/9] PCI PM: call platform helpers properly Adam Belay
2006-06-06  0:31 ` Benjamin Herrenschmidt [this message]
2006-06-07  2:52   ` Adam Belay
2006-06-07  4:09     ` Benjamin Herrenschmidt

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=1149553874.559.2.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=abelay@novell.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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