]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC: Fix code ordering issue in ec_remove_handlers()
authorLv Zheng <lv.zheng@intel.com>
Fri, 8 Jul 2016 01:25:05 +0000 (09:25 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Jul 2016 19:44:12 +0000 (21:44 +0200)
commitd5273e405b0df59e11426aaf4cbe14b52f35d077
tree530ec2195a8df480e5e2f197cf21d61cf3143951
parent94d7a1f5db336400539d53c4e1493f05ad047d95
ACPI / EC: Fix code ordering issue in ec_remove_handlers()

There is an order issue in ec_remove_handlers() that acpi_ec_stop()
is called before removing the operation region handler. That is
incorrect, because the operation region handler removal triggers
_REG(DISCONNECT) which may result in new EC transactions to carry
out.

That existing issue has been triggered by the following commit:

    Commit: 4092c9be82af20d46c207ae0a48509c3ff587fe1
    Subject: ACPI / EC: Fix a boot EC regresion by restoring boot EC

which changed the driver to call ec_remove_handlers() after invoking
_REG(CONNECT), so the issue has become visible.

Fixes: 4092c9be82af (ACPI / EC: Fix a boot EC regresion by restoring boot EC)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=102421
Reported-and-tested-by: Wolfram Sang <wsa@the-dreams.de>
Reported-by: Nicholas <nkudriavtsev@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c