* ACPI on Macbook
@ 2006-06-06 6:45 Ryan Lortie
2006-06-10 6:04 ` Frederic Riss
0 siblings, 1 reply; 2+ messages in thread
From: Ryan Lortie @ 2006-06-06 6:45 UTC (permalink / raw)
To: linux-acpi; +Cc: Matthew Garrett
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ACPI on Macbook
2006-06-06 6:45 ACPI on Macbook Ryan Lortie
@ 2006-06-10 6:04 ` Frederic Riss
0 siblings, 0 replies; 2+ messages in thread
From: Frederic Riss @ 2006-06-10 6:04 UTC (permalink / raw)
To: linux-acpi
Hi,
Ryan Lortie <desrt <at> desrt.ca> writes:
> I have been working on getting my new Macbook working with Ubuntu dapper
> for suspend.
>[...]
> 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.
> [...]
> 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.
Same symptoms for me on an Intel Core Duo Mac Mini (I had filed a bug about it
http://bugzilla.kernel.org/show_bug.cgi?id=6670 ). Ryan's hack does fix it as
well for me; anybody has any clue how to fix that properly ?
Fred.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-10 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-06 6:45 ACPI on Macbook Ryan Lortie
2006-06-10 6:04 ` Frederic Riss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox