xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-pci@vger.kernel.org, Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: [PATCH] acpiphp: assume device is in state D0 after powering on a slot.
Date: Wed, 11 May 2011 17:00:32 +0100	[thread overview]
Message-ID: <1305129632-2646-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <20110511084354.49eee757@jbarnes-desktop>

Devices which do not support PCI configuration space based power
management may not otherwise be enabled.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 drivers/pci/hotplug/acpiphp_glue.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 2f67e9b..a70fa89 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -827,6 +827,13 @@ static int __ref enable_device(struct acpiphp_slot *slot)
 	acpiphp_set_hpp_values(bus);
 	acpiphp_set_acpi_region(slot);
 	pci_enable_bridges(bus);
+
+	list_for_each_entry(dev, &bus->devices, bus_list) {
+		/* Assume that newly added devices are powered on already. */
+		if (!dev->is_added)
+			dev->current_state = PCI_D0;
+	}
+
 	pci_bus_add_devices(bus);
 
 	list_for_each_entry(func, &slot->funcs, sibling) {
-- 
1.7.2.5

  reply	other threads:[~2011-05-11 16:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 16:20 [RFC PATCH] set current_state to D0 in register_slot Stefano Stabellini
2011-03-04 18:42 ` Jesse Barnes
2011-03-07 15:01   ` Stefano Stabellini
2011-03-08 14:50   ` [Xen-devel] " Ian Campbell
2011-03-08 16:17     ` Ian Campbell
2011-03-16 12:34       ` Stefano Stabellini
2011-03-16 15:32         ` Jesse Barnes
2011-03-16 16:13           ` Stefano Stabellini
2011-05-11 13:33             ` Ian Campbell
2011-05-11 15:43               ` [Xen-devel] " Jesse Barnes
2011-05-11 16:00                 ` Ian Campbell [this message]
2011-05-11 16:14                   ` [PATCH] acpiphp: assume device is in state D0 after powering on a slot Jesse Barnes
2011-05-12  9:21                     ` Ian Campbell

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=1305129632-2646-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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;
as well as URLs for NNTP newsgroup(s).