ACPICA: Clear PM register write-only bits on reading
[deliverable/linux.git] / drivers / acpi / acpica / hwregs.c
index f8ee0a7fd44d6387be7502e26cbb6df2e8a3a33c..7b2fb602b5cbf59a441a98950078e34a6d7f862b 100644 (file)
@@ -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 */
This page took 0.025738 seconds and 5 git commands to generate.