mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.5.69-mm5: reverting i8259-shutdown.patch
Date: Wed, 14 May 2003 19:33:00 -0700	[thread overview]
Message-ID: <20030514193300.58645206.akpm@digeo.com> (raw)
In-Reply-To: <1052965395.758.3.camel@teapot.felipe-alfaro.com>

Felipe Alfaro Solana <felipe_alfaro@linuxmail.org> wrote:
>
> Hi again, Andrew,
> 
> Besides the "make_KOBJ_NAME-match_BUS_ID_SIZE.patch" causing "pccard"
> oopses, I've also found that, with 2.5.69-mm5 compiled with ACPI
> support, my laptop is unable to power off. The kernel invokes
> "acpi_power_off" and stays there forever.
> 
> I've found that reverting the "i8259-shutdown.patch" fixes the problem
> and my laptop is able to shutdown properly (init 0) when using ACPI.
> 
> A hardware bug? A kernel bug?

And thanks again, again.

That's the below patch.  It looks pretty innocuous.  I'd be assuming that
there's something in the shutdown sequence which needs 8259 functionality
after the thing has been turned off.

This could well depend upon .config contents and linkage order.

Eric, maybe we need to turn it off by hand at the right time rather than
relying on driver model shutdown ordering?


 arch/i386/kernel/i8259.c |   11 +++++++++++
 1 files changed, 11 insertions(+)

diff -puN arch/i386/kernel/i8259.c~i8259-shutdown arch/i386/kernel/i8259.c
--- 25/arch/i386/kernel/i8259.c~i8259-shutdown	2003-05-11 18:48:58.000000000 -0700
+++ 25-akpm/arch/i386/kernel/i8259.c	2003-05-11 18:48:58.000000000 -0700
@@ -245,10 +245,21 @@ static int i8259A_resume(struct device *
 	return 0;
 }
 
+static void i8259A_shutdown(struct device *dev)
+{   
+	/* Put the i8259A into a quiescent state that
+	 * the kernel initialization code can get it
+	 * out of.
+	 */
+	outb(0xff, 0x21);	/* mask all of 8259A-1 */
+	outb(0xff, 0xA1);	/* mask all of 8259A-1 */
+}
+
 static struct device_driver i8259A_driver = {
 	.name		= "pic",
 	.bus		= &system_bus_type,
 	.resume		= i8259A_resume,
+	.shutdown	= i8259A_shutdown,
 };
 
 static struct sys_device device_i8259A = {

_


  reply	other threads:[~2003-05-15  2:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-15  2:23 Felipe Alfaro Solana
2003-05-15  2:33 ` Andrew Morton [this message]
2003-05-15  2:39   ` Patrick Mochel
2003-05-15  2:45     ` Zwane Mwaikambo
2003-05-15  3:00       ` Patrick Mochel
2003-05-15 12:02         ` Felipe Alfaro Solana
2003-05-15 17:35           ` Patrick Mochel
2003-05-15  6:14     ` Andrew Morton
2003-05-15  6:13       ` Zwane Mwaikambo
2003-05-15  7:56         ` Zwane Mwaikambo
2003-05-15 17:34           ` Patrick Mochel
2003-05-15 12:07       ` Felipe Alfaro Solana
2003-05-17 19:25         ` Zwane Mwaikambo
2003-05-17 19:47           ` Felipe Alfaro Solana
2003-05-17 20:35             ` Zwane Mwaikambo
2003-05-18 19:42               ` Felipe Alfaro Solana
2003-05-16 19:41     ` 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=20030514193300.58645206.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®