aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-12 16:03:14 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-07-12 16:03:14 -0400
commitd0420d20bacd1eef9f75a769ad48befd383ad190 (patch)
treedbaaee49ccfe4414a35f674eff93b20e07d9aab5
parent00c611def8748a0a1cf1d31842e49b42dfdb3de1 (diff)
parentfa5b4a509d7bbba5d45c8ea177bddfd0b618876a (diff)
Merge branches 'acpica-fixes' and 'acpi-ec-fixes'
* acpica-fixes: Revert "ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis" Revert "ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading" Revert "ACPICA: Namespace: Fix namespace/interpreter lock ordering" * acpi-ec-fixes: ACPI / EC: Fix code ordering issue in ec_remove_handlers()
-rw-r--r--drivers/acpi/ec.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 73c76d646064..290d6f5be44b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1331,8 +1331,6 @@ static int ec_install_handlers(struct acpi_ec *ec)
1331 1331
1332static void ec_remove_handlers(struct acpi_ec *ec) 1332static void ec_remove_handlers(struct acpi_ec *ec)
1333{ 1333{
1334 acpi_ec_stop(ec, false);
1335
1336 if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) { 1334 if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
1337 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, 1335 if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
1338 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler))) 1336 ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
@@ -1340,6 +1338,19 @@ static void ec_remove_handlers(struct acpi_ec *ec)
1340 clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags); 1338 clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
1341 } 1339 }
1342 1340
1341 /*
1342 * Stops handling the EC transactions after removing the operation
1343 * region handler. This is required because _REG(DISCONNECT)
1344 * invoked during the removal can result in new EC transactions.
1345 *
1346 * Flushes the EC requests and thus disables the GPE before
1347 * removing the GPE handler. This is required by the current ACPICA
1348 * GPE core. ACPICA GPE core will automatically disable a GPE when
1349 * it is indicated but there is no way to handle it. So the drivers
1350 * must disable the GPEs prior to removing the GPE handlers.
1351 */
1352 acpi_ec_stop(ec, false);
1353
1343 if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) { 1354 if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
1344 if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe, 1355 if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
1345 &acpi_ec_gpe_handler))) 1356 &acpi_ec_gpe_handler)))