All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: Matthew Garrett <mjg@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Len Brown <len.brown@intel.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [bisected] PS/2 keyboard and mouse dead on resume on Intel D845BG
Date: Sun, 7 Oct 2012 21:00:09 +0200	[thread overview]
Message-ID: <201210072100.09813.linux@rainbow-software.org> (raw)
In-Reply-To: <201210071513.27959.linux@rainbow-software.org>

On Sunday 07 October 2012 15:13:27 Ondrej Zary wrote:
> Hello,
> Intel D845BG board comes out of S3 with PS/2 keyboard and mouse completely
> dead. The machine works otherwise (with USB keyboard or over network). When
> rebooted in this state, the BIOS hangs with blank screen. I have the latest
> BIOS installed (P08).
>
> Old kernels worked. Bisection pointed to commit:
> b6dacf63e9fb2e7a1369843d6cef332f76fca6a3
> (ACPI: Unconditionally set SCI_EN on resume)
>
> Commenting out this line in drivers/acpi/sleep.c:
> 	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
> fixes the problem.
>
> Any ideas why this breaks on this system?

Added acpi_read_bit_register there and it seems that SCI_EN is already set!

This patch fixes the problem here. I wonder how this affects systems that
require SCI_EN to be set.

--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -271,6 +271,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	acpi_status status = AE_OK;
 	u32 acpi_state = acpi_target_sleep_state;
 	int error;
+	u32 sci_enabled;
 
 	ACPI_FLUSH_CPU_CACHE();
 
@@ -289,7 +290,9 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 	}
 
 	/* This violates the spec but is required for bug compatibility. */
-	acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
+	acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &sci_enabled);
+	if (!sci_enabled)
+		acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
 
 	/* Reprogram control registers */
 	acpi_leave_sleep_state_prep(acpi_state);

-- 
Ondrej Zary

  reply	other threads:[~2012-10-07 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 13:13 [bisected] PS/2 keyboard and mouse dead on resume on Intel D845BG Ondrej Zary
2012-10-07 19:00 ` Ondrej Zary [this message]
2012-10-07 19:59   ` Rafael J. Wysocki
2012-10-08 14:42   ` Matthew Garrett
2012-10-09  5:11     ` Len Brown
2012-10-09  6:17       ` Ondrej Zary

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=201210072100.09813.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.