rpms/kernel/devel linux-2.6-suspend-ordering.patch, NONE, 1.1 kernel-2.6.spec, 1.3165, 1.3166

Dave Jones (davej) fedora-extras-commits at redhat.com
Thu May 17 00:00:13 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17298

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-suspend-ordering.patch 
Log Message:
* Wed May 16 2007 Dave Jones <davej at redhat.com>
- Fix ACPI suspend / device suspend ordering problem.


linux-2.6-suspend-ordering.patch:

--- NEW FILE linux-2.6-suspend-ordering.patch ---
>From davej  Wed May 16 19:22:13 2007
Return-Path: <cebbert at redhat.com>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on
	gelk.kernelslacker.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,
	UNPARSEABLE_RELAY autolearn=ham version=3.1.8
Received: from pobox.devel.redhat.com [10.11.255.8]
	by gelk.kernelslacker.org with IMAP (fetchmail-6.3.6)
	for <davej at localhost> (single-drop); Wed, 16 May 2007 19:22:13 -0400 (EDT)
Received: from pobox.devel.redhat.com ([unix socket])
	 by pobox.devel.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;
	 Wed, 16 May 2007 19:21:37 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])
	by pobox.devel.redhat.com (8.13.1/8.13.1) with ESMTP id l4GNLbcA029277
	for <davej at pobox.devel.redhat.com>; Wed, 16 May 2007 19:21:37 -0400
Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12])
	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4GNLaBd019679
	for <davej at int-mx1.corp.redhat.com>; Wed, 16 May 2007 19:21:37 -0400
Received: from [172.16.83.145] (dhcp83-145.boston.redhat.com [172.16.83.145])
	by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id l4GNLaQX003318
	for <davej at redhat.com>; Wed, 16 May 2007 19:21:36 -0400
Message-ID: <464B9200.4020608 at redhat.com>
Date: Wed, 16 May 2007 19:21:36 -0400
From: Chuck Ebbert <cebbert at redhat.com>
Organization: Red Hat
User-Agent: Thunderbird 1.5.0.10 (X11/20070302)
MIME-Version: 1.0
To: Dave Jones <davej at redhat.com>
Subject: [Fwd: Fix ACPI suspend / device suspend ordering problem]
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Status: RO
X-Status: A
Content-Length: 5438
Lines: 113

Critical?

-------- Original Message --------
From: - Wed May 16 19:07:30 2007
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <git-commits-head-owner at vger.kernel.org>
Received: from mail.boston.redhat.com ([unix socket])	 by mail.boston.redhat.com (Cyrus v2.2.12-Invoca-RPM-2.2.12-8.1.RHEL4) with LMTPA;	 Wed, 16 May 2007 19:06:49 -0400
X-Sieve: CMU Sieve 2.2
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254])	by mail.boston.redhat.com (8.13.1/8.13.1) with ESMTP id l4GN6nq7000976;	Wed, 16 May 2007 19:06:49 -0400
Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31])	by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4GN6nqE015463;	Wed, 16 May 2007 19:06:49 -0400
Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])	by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4GMoCil002002;	Wed, 16 May 2007 19:06:47 -0400
Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand	id S1757466AbXEPW7G (ORCPT <rfc822;cebbert at redhat.com> + 6 others);	Wed, 16 May 2007 18:59:06 -0400
Received: (majordomo at vger.kernel.org) by vger.kernel.org id S1758932AbXEPW7G	(ORCPT <rfc822;git-commits-head-outgoing>);	Wed, 16 May 2007 18:59:06 -0400
Received: from hera.kernel.org ([140.211.167.34]:42826 "EHLO hera.kernel.org"	rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP	id S1757466AbXEPW7F (ORCPT	<rfc822;git-commits-head at vger.kernel.org>);	Wed, 16 May 2007 18:59:05 -0400
Received: from hera.kernel.org (IDENT:U2FsdGVkX1/F89m4CLkIIOh66EDb7VKNkI7V6uasSZE at localhost [127.0.0.1])	by hera.kernel.org (8.13.8/8.13.7) with ESMTP id l4GMx3Zd012529	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)	for <git-commits-head at vger.kernel.org>; Wed, 16 May 2007 22:59:03 GMT
Received: (from dwmw2 at localhost)	by hera.kernel.org (8.13.8/8.13.1/Submit) id l4GMx2rV012500	for git-commits-head at vger.kernel.org; Wed, 16 May 2007 22:59:02 GMT
Date: Wed, 16 May 2007 22:59:02 GMT
Message-Id: <200705162259.l4GMx2rV012500 at hera.kernel.org>
From: Linux Kernel Mailing List <linux-kernel at vger.kernel.org>
To: git-commits-head at vger.kernel.org
Subject: Fix ACPI suspend / device suspend ordering problem
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Git-Commit: 52ade9b3b97fd3bea42842a056fe0786c28d0555
X-Git-Parent: 7b104bcb8e460e45a1aebe3da9b86aacdb4cab12
X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00	autolearn=ham version=3.1.8
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on hera.kernel.org
Sender: git-commits-head-owner at vger.kernel.org
Precedence: bulk
X-Mailing-List: git-commits-head at vger.kernel.org
X-RedHat-Spam-Score: 0

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=52ade9b3b97fd3bea42842a056fe0786c28d0555
Commit:     52ade9b3b97fd3bea42842a056fe0786c28d0555
Parent:     7b104bcb8e460e45a1aebe3da9b86aacdb4cab12
Author:     Linus Torvalds <torvalds at woody.linux-foundation.org>
AuthorDate: Wed May 16 15:28:14 2007 -0700
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Wed May 16 15:33:19 2007 -0700

    Fix ACPI suspend / device suspend ordering problem
    
    In commit e3c7db621bed4afb8e231cb005057f2feb5db557 we fixed the resume
    ordering, so that the ACPI low-level resume code was called before the
    actual driver resume was called. However, that broke the nesting logic
    of suspend and resume, and we continued to suspend the devices _after_
    we the ACPI device suspend code was called.
    
    That resulted in us saving PCI state for devices that had already been
    changed by ACPI, and in some cases disabled entirely (causing the PCI
    save_state to be all-ones).  Which in turn caused the wrong state to be
    written back on resume.
    
    This moves the ACPI device suspend to after the device model per-device
    suspend() calls. This fixes the bogus state save.
    
    Thanks to Lukáš Hejtmánek for testing.
    
    Acked-by: Lukas Hejtmanek <xhejtman at ics.muni.cz>
    Acked-by: Rafael J. Wysocki <rjw at sisk.pl>
    Cc: Len Brown <len.brown at intel.com>
    Cc: Pavel Machek <pavel at ucw.cz>
    Cc: Andrew Morton <akpm at linux-foundation.org>
    Cc: Greg KH <greg at kroah.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 kernel/power/main.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/kernel/power/main.c b/kernel/power/main.c
index 40d56a3..b98b80c 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -97,25 +97,26 @@ static int suspend_prepare(suspend_state_t state)
 		}
 	}
 
-	if (pm_ops->prepare) {
-		if ((error = pm_ops->prepare(state)))
-			goto Thaw;
-	}
-
 	suspend_console();
 	error = device_suspend(PMSG_SUSPEND);
 	if (error) {
 		printk(KERN_ERR "Some devices failed to suspend\n");
-		goto Resume_devices;
+		goto Resume_console;
 	}
+	if (pm_ops->prepare) {
+		if ((error = pm_ops->prepare(state)))
+			goto Resume_devices;
+	}
+
 	error = disable_nonboot_cpus();
 	if (!error)
 		return 0;
 
 	enable_nonboot_cpus();
- Resume_devices:
 	pm_finish(state);
+ Resume_devices:
 	device_resume();
+ Resume_console:
 	resume_console();
  Thaw:
 	thaw_processes();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3165
retrieving revision 1.3166
diff -u -r1.3165 -r1.3166
--- kernel-2.6.spec	15 May 2007 20:49:33 -0000	1.3165
+++ kernel-2.6.spec	16 May 2007 23:59:39 -0000	1.3166
@@ -563,6 +563,7 @@
 Patch1700: linux-2.6-dvb-spinlock.patch
 Patch1710: linux-2.6-nfs-noreaddirplus.patch
 Patch1720: linux-2.6-proc-self-maps-fix.patch
+Patch1730: linux-2.6-suspend-ordering.patch
 Patch1740: linux-2.6-softlockup-disable.patch
 Patch1770: linux-2.6-optimise-spinlock-debug.patch
 Patch1771: linux-2.6-silence-noise.patch
@@ -1299,6 +1300,8 @@
 %patch1710 -p1
 # setuid /proc/self/maps fix.
 %patch1720 -p1
+# Fix ACPI suspend / device suspend ordering problem
+%patch1730 -p1
 # Add a safety net to softlockup so that it doesn't prevent installs.
 %patch1740 -p1
 # Speed up spinlock debug.
@@ -2359,6 +2362,9 @@
 %endif
 
 %changelog
+* Wed May 16 2007 Dave Jones <davej at redhat.com>
+- Fix ACPI suspend / device suspend ordering problem.
+
 * Tue May 15 2007 Dave Jones <davej at redhat.com>
 - Make hdaps timer only tick when in use. [Matthew Garrett]
 




More information about the fedora-extras-commits mailing list