LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Tino Keitel <tino.keitel@gmx.de>
Cc: linux-kernel@vger.kernel.org, stable@kernel.org,
Greg KH <greg@kroah.com>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>, "Bob Copeland" <me@bobcopeland.com>
Subject: Re: [stable] Suspend regression in stable kernel 2.6.27.4 on Mac mini Core Duo
Date: Thu, 13 Nov 2008 23:18:12 +0100 [thread overview]
Message-ID: <200811132318.13821.rjw@sisk.pl> (raw)
In-Reply-To: <20081113192656.GA5735@dose.home.local>
On Thursday, 13 of November 2008, Tino Keitel wrote:
> On Wed, Nov 12, 2008 at 22:41:08 +0100, Rafael J. Wysocki wrote:
> > On Wednesday, 12 of November 2008, Tino Keitel wrote:
> > > On Wed, Nov 12, 2008 at 01:03:54 +0100, Rafael J. Wysocki wrote:
> > >
> > > [...]
> > >
> > > > Also, can you check this patch on top of 2.6.27.4 and see what happens?
> > >
> > > With that patch, resume works (although I used 2.6.27.5 and not
> > > 2.6.27.5, if that matters).
> >
> > It shouldn't really matter.
> >
> > Thanks for testing and please send me the output of dmidecode.
> > It seems that blacklisting may be the only way to handle your box. :-(
>
> Attached.
Please try the appended patch on top of the Linus' tree.
Thanks,
Rafael
---
drivers/acpi/sleep/main.c | 40 +++++++++++++++++++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
Index: linux-2.6/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep/main.c
+++ linux-2.6/drivers/acpi/sleep/main.c
@@ -104,6 +104,18 @@ void __init acpi_s4_no_nvs(void)
s4_no_nvs = true;
}
+/*
+ * According to the ACPI specification the BIOS should make sure that ACPI is
+ * enabled and SCI_EN bit is set on wake-up from S1 - S3 sleep states. Still,
+ * some BIOSes don't do that and therefore we use acpi_enable() to enable ACPI
+ * on such systems during resume. Unfortunately that doesn't help in
+ * particularly pathological cases in which SCI_EN has to be set directly on
+ * resume, although the specification states very clearly that this flag is
+ * owned by the hardware. The set_sci_en_on_resume variable will be set in such
+ * cases.
+ */
+static bool set_sci_en_on_resume;
+
/**
* acpi_pm_disable_gpes - Disable the GPEs.
*/
@@ -249,7 +261,11 @@ static int acpi_suspend_enter(suspend_st
}
/* If ACPI is not enabled by the BIOS, we need to enable it here. */
- acpi_enable();
+ if (set_sci_en_on_resume)
+ acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
+ else
+ acpi_enable();
+
/* Reprogram control registers and execute _BFS */
acpi_leave_sleep_state_prep(acpi_state);
@@ -337,6 +353,12 @@ static int __init init_old_suspend_order
return 0;
}
+static int __init init_set_sci_en_on_resume(const struct dmi_system_id *d)
+{
+ set_sci_en_on_resume = true;
+ return 0;
+}
+
static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
{
.callback = init_old_suspend_ordering,
@@ -354,6 +376,22 @@ static struct dmi_system_id __initdata a
DMI_MATCH(DMI_PRODUCT_NAME, "HP xw4600 Workstation"),
},
},
+ {
+ .callback = init_set_sci_en_on_resume,
+ .ident = "Apple MacBook 1,1",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"),
+ },
+ },
+ {
+ .callback = init_set_sci_en_on_resume,
+ .ident = "Apple MacMini 1,1",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
+ },
+ },
{},
};
#endif /* CONFIG_SUSPEND */
next prev parent reply other threads:[~2008-11-13 22:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-09 20:28 Tino Keitel
2008-11-09 20:34 ` [stable] " Greg KH
2008-11-09 20:51 ` Rafael J. Wysocki
2008-11-10 23:30 ` Tino Keitel
2008-11-11 6:56 ` Tino Keitel
2008-11-11 14:16 ` Rafael J. Wysocki
2008-11-11 18:19 ` Tino Keitel
2008-11-11 23:48 ` Rafael J. Wysocki
2008-11-12 0:03 ` Rafael J. Wysocki
2008-11-12 7:36 ` Tino Keitel
2008-11-12 21:41 ` Rafael J. Wysocki
2008-11-13 19:26 ` Tino Keitel
2008-11-13 22:18 ` Rafael J. Wysocki [this message]
2008-11-15 23:04 ` Rafael J. Wysocki
2008-11-16 20:27 ` Bob Copeland
2008-12-08 7:55 ` Tino Keitel
2008-12-08 11:25 ` Rafael J. Wysocki
2008-11-12 6:24 ` Tino Keitel
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=200811132318.13821.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=greg@kroah.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@bobcopeland.com \
--cc=stable@kernel.org \
--cc=tino.keitel@gmx.de \
--subject='Re: [stable] Suspend regression in stable kernel 2.6.27.4 on Mac mini Core Duo' \
/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
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).