From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750726AbVH0TtD (ORCPT ); Sat, 27 Aug 2005 15:49:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750742AbVH0TtD (ORCPT ); Sat, 27 Aug 2005 15:49:03 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:43747 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S1750726AbVH0TtB (ORCPT ); Sat, 27 Aug 2005 15:49:01 -0400 To: Pavel Machek Cc: Linus Torvalds , Meelis Roos , Linux Kernel list , Masoud Sharbiani , Len Brown , Andrew Morton Subject: Re: [PATCH] [ACPI] acpi_shutdown: Only prepare for power off on power_off References: <20050827115759.GB1109@openzaurus.ucw.cz> From: ebiederm@xmission.com (Eric W. Biederman) Date: Sat, 27 Aug 2005 13:48:14 -0600 In-Reply-To: <20050827115759.GB1109@openzaurus.ucw.cz> (Pavel Machek's message of "Sat, 27 Aug 2005 13:58:00 +0200") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Pavel Machek writes: > Hi! > >> When acpi_sleep_prepare was moved into a shutdown method we >> started calling it for all shutdowns. It appears this triggers >> some systems to power off on reboot. Avoid this by only calling >> acpi_sleep_prepare if we are going to power off the system. > > Are you sure that system_state is correctly set at this point? There are > quite a few ways that lead to this... - It is an error if system_state is not set properly. - Do to my earlier cleanups there are only 4 functions that call device_shutdown they are: kernel_restart(), kernel_kexec(), kernel_halt(), kernel_power_off() And those four all set system_state correctly. If you can find another path that calls this incorrectly I would be happy to fix it. But my grep through the kernel doesn't reveal any other callers. Eric