summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-01-15 22:15:32 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-01-15 22:15:32 +0000
commit6374f4899dc23cc75912a9fa192f64bf1a43cc00 (patch)
tree82f388f01b4a3f74aae458385c78d25e172103a3 /sys
parent2b6858307d0dae1cdabad89df2b463c5dd4e6c4a (diff)
In dwiic_acpi_foundhid() treat _STA missing as if all the bits
were set as per the acpi spec. ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/dwiic.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/acpi/dwiic.c b/sys/dev/acpi/dwiic.c
index 2ae327c4470..05daea98010 100644
--- a/sys/dev/acpi/dwiic.c
+++ b/sys/dev/acpi/dwiic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwiic.c,v 1.5 2016/01/15 20:52:49 kettenis Exp $ */
+/* $OpenBSD: dwiic.c,v 1.6 2016/01/15 22:15:31 jsg Exp $ */
/*
* Synopsys DesignWare I2C controller
*
@@ -497,12 +497,11 @@ dwiic_acpi_foundhid(struct aml_node *node, void *arg)
DPRINTF(("%s: found HID %s at %s\n", sc->sc_dev.dv_xname, dev,
aml_nodename(node)));
- if (aml_evalinteger(acpi_softc, node->parent, "_STA", 0, NULL, &sta) ||
- !sta) {
- printf("%s: _sta failed at %s\n", sc->sc_dev.dv_xname,
- aml_nodename(node->parent));
+ if (aml_evalinteger(acpi_softc, node->parent, "_STA", 0, NULL, &sta))
+ sta = STA_PRESENT | STA_ENABLED | STA_DEV_OK | 0x1000;
+
+ if ((sta & STA_PRESENT) == 0)
return 0;
- }
if (!aml_searchname(node->parent, "_DSM")) {
printf("%s: couldn't find _DSM at %s\n", sc->sc_dev.dv_xname,