From c3dd25f4c1ca84baa170c0a3a15a884f4f06297e Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Thu, 19 Mar 2009 09:51:01 +0800 Subject: ACPICA: Clear PM register write-only bits on reading Affects PM1 Control register only. When reading the register, zero the write-only bits as per the ACPI spec. ACPICA BZ 443. Lin Ming. http://www.acpica.org/bugzilla/show_bug.cgi?id=443 Signed-off-by: Lin Ming Signed-off-by: Bob Moore Signed-off-by: Len Brown --- drivers/acpi/acpica/hwregs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/acpi/acpica/hwregs.c') diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index f8ee0a7fd44d..7b2fb602b5cb 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c @@ -207,6 +207,13 @@ acpi_hw_register_read(u32 register_id, u32 * return_value) xpm1a_control_block, &acpi_gbl_FADT. xpm1b_control_block); + + /* + * Zero the write-only bits. From the ACPI specification, "Hardware + * Write-Only Bits": "Upon reads to registers with write-only bits, + * software masks out all write-only bits." + */ + value &= ~ACPI_PM1_CONTROL_WRITEONLY_BITS; break; case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ -- cgit v1.2.3