From: Ryan Lortie <desrt@desrt.ca>
To: linux-acpi@vger.kernel.org
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Subject: ACPI on Macbook
Date: Tue, 06 Jun 2006 02:45:47 -0400 [thread overview]
Message-ID: <1149576347.660.9.camel@moonpix.desrt.ca> (raw)
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
Hello.
I have been working on getting my new Macbook working with Ubuntu dapper
for suspend.
Initially, the machine would crash on wake up. I created a fix to the
PCI drivers for that and now it doesn't crash (fix is now in the Ubuntu
kernel repository).
After this fix I noticed that ACPI was non-functional after reboot.
This is because the irq9 handler gets disabled with the "nobody cared"
message.
This happens because when the machine comes up, irq9 is high
(level-triggered) but the ACPI code doesn't think it has anything to do.
It therefore returns IRQ_NONE instead of IRQ_HANDLED and the kernel
starts ignoring irq9 (preventing ACPI from working).
I found that the cause of this problem is that when the laptop returns
from sleep the SCI_EN bit has been cleared. Actually, the entire PM1
register has been cleared (from inspecting the ports with a userspace
app). On the ICH7 you can directly set this bit by 'or'ing the contents
of the PM1 port (0x404) with the value 0x01.
Currently in my custom-patched kernel I have a quick outw(1, 0x404); as
soon as the system comes back from sleep (before re-enabling interrupts,
even). This fixes the problem and no spurious irq9's are issued.
This works smashingly well for me but unfortunately it's a gigantic ugly
hack. I've been talking to Matthew Garrett (mjg59) about this problem
and he suggested that it might be at least a tiny bit cleaner to put a
call to acpi_enable() there instead (set SCI_EN indirectly since the
ACPI spec says it might not be correct to set it directly).
Unfortunately, when I do this the machine locks on resume.
So I'm writing this list to ask a couple of things:
1) Why do y'all think SCI_EN is being cleared when the machine goes to
sleep and wakes up again?
2) What is the best way of dealing with this problem in a non-hackish
way?
I'm not on the list so please reply-to-all.
Cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 703 bytes --]
next reply other threads:[~2006-06-06 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-06 6:45 Ryan Lortie [this message]
2006-06-10 6:04 ` ACPI on Macbook Frederic Riss
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=1149576347.660.9.camel@moonpix.desrt.ca \
--to=desrt@desrt.ca \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
/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