summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2017-06-15 09:41:35 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-29 00:00:01 +0200
commitae56c9fd1518f9ac8def938638aebd2d7d289325 (patch)
tree48e1665fbc51a5320943b1de21f1db737bf1e55f /drivers/acpi
parent4625d752e600c116e6327f9d7fc16e8f5be107e9 (diff)
ACPI / EC: Enhance boot EC sanity check
It's reported that some buggy BIOS tables can contain 2 DSDT ECs, one of them is invalid but acpi_ec_dsdt_probe() fails to pick the valid one. This patch simply enhances sanity checks in ec_parse_device() as a workaround to skip probing wrong namespace ECs. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/ec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index f3ff5919e399..b4fd026c8229 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1363,6 +1363,8 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
ec_parse_io_ports, ec);
if (ACPI_FAILURE(status))
return status;
+ if (ec->data_addr == 0 || ec->command_addr == 0)
+ return AE_OK;
/* Get GPE bit assignment (EC events). */
/* TODO: Add support for _GPE returning a package */