From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: 2.6.0-test6: APM unable to suspend (the 2.6.0-test2 saga continues)
Date: Tue, 30 Dec 2003 16:50:42 +0000 [thread overview]
Message-ID: <20031230165042.B13556@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20031230114324.A1632@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Tue, Dec 30, 2003 at 11:43:24AM +0000
On Tue, Dec 30, 2003 at 11:43:24AM +0000, Russell King wrote:
> On Sun, Dec 28, 2003 at 12:49:21PM -0800, Linus Torvalds wrote:
> > On Sun, 28 Dec 2003, Russell King wrote:
> > >
> > > Would it be possible to switch LDT/GDT to whatever the APM BIOS expects
> > > just before calling the APM BIOS to suspend/hibernate, and restore them
> > > to whatever Linux requires after the APM BIOS returns from resume?
> >
> > Possible, yes. But it would help a lot to know what's wrong with the
> > current segments - we did leave most of them with exactly the same layout
> > as before, and I thought we explicitly left the ones that APM cares about
> > that way..
>
> With thanks to Arjan, I think we've proven that this is not the change
> which is causing the problem by testing various Red Hat and Fedora 2.4
> kernels on the machine (which have various 2.6 NPTL backports.)
>
> I'm now back to being completely out of my depth on this issue; a 2.4
> kernel booted through to init=/bin/bash suspends, but a 2.6 kernel
> with the same hardware support booted to the same point refuses to
> suspend via APM.
>
> I think I'm going to have to resort to a binary search of the 2.5
> kernel series to find out exactly what broke and when.
Ok, the binary search led me to a changeset between 2.5.25 and 2.5.26
kernels. Further investigation led me to i8042.c, specifically this:
static void __init i8042_start_polling(void)
{
i8042_ctr &= ~I8042_CTR_KBDDIS;
if (i8042_aux_values.exists)
i8042_ctr &= ~I8042_CTR_AUXDIS;
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
printk(KERN_WARNING "i8042.c: Can't write CTR while starting polling.\n");
return;
}
// i8042_timer.function = i8042_timer_func;
// mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
}
With the function as above, the observed behaviour is as follows:
- don't call i8042_start_polling at all - suspend works
- call i8042_start_polling - suspend fails
It seems that my BIOS is taking exception to CTR value we're writing.
My next step will be to try this with 2.6.0 and see whether this is the
only issue affecting APM suspend. In the mean time, does Vojtech have
any hints?
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2003-12-30 16:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-05 16:10 2.6.0-test6: APM unable to suspend (the 2.6.0-test2 saga continues) Russell King
2003-12-28 17:46 ` Russell King
2003-12-28 18:25 ` Russell King
2003-12-28 20:49 ` Linus Torvalds
2003-12-30 11:43 ` Russell King
2003-12-30 16:50 ` Russell King [this message]
2003-12-30 18:17 ` Russell King
2003-12-30 18:47 ` Linus Torvalds
2003-12-30 19:40 ` Russell King
2003-12-30 19:53 ` Russell King
2003-12-30 23:00 ` Vojtech Pavlik
2003-12-31 1:45 ` Dmitry Torokhov
2003-12-31 12:40 ` Vojtech Pavlik
2004-01-03 3:43 ` Rusty Russell
2004-01-03 18:28 ` Pavel Machek
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=20031230165042.B13556@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=vojtech@suse.cz \
/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