> The diff you sent simply ignores the issue which obviously can not be
> used in the tree.

The following diff starts working in the right direction, but there is
probably more to do in order to support machines like yours.

It would be interesting to see if that printf gets triggered though, so
please test and let me know. Also, send that acpidump.


Index: acpiec.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpiec.c,v
retrieving revision 1.54
diff -u -p -u -p -r1.54 acpiec.c
--- acpiec.c    23 Aug 2016 18:26:21 -0000      1.54
+++ acpiec.c    13 Oct 2016 08:16:52 -0000
@@ -410,8 +410,8 @@ int
 acpiec_getcrs(struct acpiec_softc *sc, struct acpi_attach_args *aa)
 {
        struct aml_value        res;
-       bus_size_t              ec_sc, ec_data;
-       int                     dtype, ctype;
+       bus_size_t              ec_sc, ec_data, ec_gpio;
+       int                     dtype, ctype, iotype;
        char                    *buf;
        int                     size, ret;
        int64_t                 gpe;
@@ -480,6 +480,20 @@ acpiec_getcrs(struct acpiec_softc *sc, s
 
        buf += ret;
        size -= ret;
+
+       if (sc->sc_acpi->sc_hw_reduced) {
+               ret = acpiec_getregister(buf, size, &iotype, &ec_gpio);
+               if (ret <= 0) {
+                       dnprintf(10, "%s: failed to read GPIO from _CRS\n",
+                           DEVNAME(sc));
+                       aml_freevalue(&res);
+                       return (1);
+               }
+               printf("%s: found GPIO port\n", DEVNAME(sc));
+
+               buf += ret;
+               size -= ret;
+       }
 
        if (size != 2 || *buf != RES_TYPE_ENDTAG) {
                dnprintf(10, "%s: no _CRS end tag\n", DEVNAME(sc));

Reply via email to