If the SCI_EVT flag is no longer set after processing an event, we
should clear sc->sc_gotsci, otherwise we'll do a pointless query of
the embedded controller.  Such a query is actually hazardous on some
embedded controllers.  At least I have an HP laptop where this makes
the embedded controller block, hanging the acpi thread.  This makes
suspend/resume work on that laptop.  Without this diff it doesn't even
attempt to suspend; I just get the prompt back after typing zzz.

As with all acpi diffs, this needs testing.  So if your machine has
acpiec0 in its dmesg, please give this a shot, even if your machines
works perfectly already.


Index: acpiec.c
===================================================================
RCS file: /home/cvs/src/sys/dev/acpi/acpiec.c,v
retrieving revision 1.47
diff -u -p -r1.47 acpiec.c
--- acpiec.c    18 Jan 2013 06:02:51 -0000      1.47
+++ acpiec.c    30 Jun 2013 10:03:58 -0000
@@ -343,6 +343,8 @@ acpiec_gpehandler(struct acpi_softc *acp
 
                if (stat & EC_STAT_SCI_EVT)
                        sc->sc_gotsci = 1;
+               else
+                       sc->sc_gotsci = 0;
        } while (sc->sc_gotsci);
 
        /* Unmask the GPE which was blocked at interrupt time */

Reply via email to