[kernel] fix buglet(?) in runtime_pm_fixups.patch

Kyle McMartin kyle at fedoraproject.org
Mon Jan 24 22:47:26 UTC 2011


commit 641f5c96f61c0ae28ee93a66d7da6fd776c6eb15
Author: Kyle McMartin <kyle at redhat.com>
Date:   Mon Jan 24 13:55:48 2011 -0500

    fix buglet(?) in runtime_pm_fixups.patch

 kernel.spec             |    4 +++-
 runtime_pm_fixups.patch |   21 +++++++++++++++------
 2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 85f22fd..1cd30ed 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1955,7 +1955,9 @@ fi
 %changelog
 * Mon Jan 24 2011 Kyle McMartin <kmcmartin at redhat.com>
 - debug-tty-print-dev-name.patch: drop, haven't seen any warnings recently.
-- runtime_pm_fixups.patch: rebase and re-enable.
+- runtime_pm_fixups.patch: rebase and re-enable, make acpi_power_transition
+   in pci_bind actually do the right thing instead of (likely) always
+   trying to transition to D0.
 
 * Mon Jan 24 2011 Kyle McMartin <kmcmartin at redhat.com> 2.6.38-0.rc2.git1.1
 - Linux 2.6.38-rc2-git1
diff --git a/runtime_pm_fixups.patch b/runtime_pm_fixups.patch
index 17097b1..1be6149 100644
--- a/runtime_pm_fixups.patch
+++ b/runtime_pm_fixups.patch
@@ -1,17 +1,17 @@
-From f2002684433f9486c5bafcb5967aade367b06b73 Mon Sep 17 00:00:00 2001
+From 141d0d01ab292d4ea3a6d5e96b4048e10e68c1d3 Mon Sep 17 00:00:00 2001
 From: Kyle McMartin <kyle at mcmartin.ca>
 Date: Mon, 24 Jan 2011 13:01:57 -0500
 Subject: [PATCH] runtime_pm_fixups
 
 ---
  drivers/acpi/bus.c      |    3 ++-
- drivers/acpi/pci_bind.c |    4 ++++
+ drivers/acpi/pci_bind.c |    6 ++++++
  drivers/acpi/power.c    |    5 ++++-
  drivers/acpi/sleep.c    |    2 +-
  drivers/acpi/wakeup.c   |    2 +-
  drivers/pci/pci-acpi.c  |    2 +-
  include/acpi/acpi_bus.h |    2 +-
- 7 files changed, 14 insertions(+), 6 deletions(-)
+ 7 files changed, 16 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
 index 7ced61f..e4e0114 100644
@@ -28,7 +28,7 @@ index 7ced61f..e4e0114 100644
  			if (result)
  				goto end;
 diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
-index 2ef0409..395a184 100644
+index 2ef0409..4b0bb68 100644
 --- a/drivers/acpi/pci_bind.c
 +++ b/drivers/acpi/pci_bind.c
 @@ -32,6 +32,8 @@
@@ -40,11 +40,20 @@ index 2ef0409..395a184 100644
  #define _COMPONENT		ACPI_PCI_COMPONENT
  ACPI_MODULE_NAME("pci_bind");
  
-@@ -87,6 +89,8 @@ static int acpi_pci_bind(struct acpi_device *device)
+@@ -65,6 +67,7 @@ static int acpi_pci_bind(struct acpi_device *device)
+ 	acpi_handle handle;
+ 	struct pci_bus *bus;
+ 	struct pci_dev *dev;
++	int state;
+ 
+ 	dev = acpi_get_pci_dev(device->handle);
+ 	if (!dev)
+@@ -87,6 +90,9 @@ static int acpi_pci_bind(struct acpi_device *device)
  		device->ops.unbind = acpi_pci_unbind;
  	}
  
-+	acpi_power_transition(device, acpi_power_get_inferred_state(device));
++	acpi_power_get_inferred_state(device, &state);
++	acpi_power_transition(device, state);
 +
  	/*
  	 * Evaluate and parse _PRT, if exists.  This code allows parsing of


More information about the scm-commits mailing list