diff options
Diffstat (limited to 'sys/contrib/dev/acpica/components/hardware/hwgpe.c')
-rw-r--r-- | sys/contrib/dev/acpica/components/hardware/hwgpe.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/sys/contrib/dev/acpica/components/hardware/hwgpe.c b/sys/contrib/dev/acpica/components/hardware/hwgpe.c index 093ba80..d58a8f4 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwgpe.c +++ b/sys/contrib/dev/acpica/components/hardware/hwgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,6 +97,8 @@ AcpiHwGetGpeRegisterBit ( * RETURN: Status * * DESCRIPTION: Enable or disable a single GPE in the parent enable register. + * The EnableMask field of the involved GPE register must be + * updated by the caller if necessary. * ******************************************************************************/ @@ -133,7 +135,7 @@ AcpiHwLowSetGpe ( /* Set or clear just the bit that corresponds to this GPE */ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); - switch (Action & ~ACPI_GPE_SAVE_MASK) + switch (Action) { case ACPI_GPE_CONDITIONAL_ENABLE: @@ -165,10 +167,6 @@ AcpiHwLowSetGpe ( /* Write the updated enable mask */ Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); - if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK)) - { - GpeRegisterInfo->EnableMask = (UINT8) EnableMask; - } return (Status); } @@ -210,9 +208,7 @@ AcpiHwClearGpe ( */ RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo); - Status = AcpiHwWrite (RegisterBit, - &GpeRegisterInfo->StatusAddress); - + Status = AcpiHwWrite (RegisterBit, &GpeRegisterInfo->StatusAddress); return (Status); } @@ -253,7 +249,7 @@ AcpiHwGetGpeStatus ( /* GPE currently handled? */ if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != - ACPI_GPE_DISPATCH_NONE) + ACPI_GPE_DISPATCH_NONE) { LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER; } @@ -334,12 +330,9 @@ AcpiHwGpeEnableWrite ( ACPI_STATUS Status; - Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); - if (ACPI_SUCCESS (Status)) - { - GpeRegisterInfo->EnableMask = EnableMask; - } + GpeRegisterInfo->EnableMask = EnableMask; + Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress); return (Status); } @@ -464,7 +457,7 @@ AcpiHwEnableRuntimeGpeBlock ( /* Enable all "runtime" GPEs in this register */ Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForRun, - GpeRegisterInfo); + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); @@ -511,7 +504,7 @@ AcpiHwEnableWakeupGpeBlock ( * remaining ones. */ Status = AcpiHwGpeEnableWrite (GpeRegisterInfo->EnableForWake, - GpeRegisterInfo); + GpeRegisterInfo); if (ACPI_FAILURE (Status)) { return (Status); |