Index: sys/dev/acpica/acpi_hpet.c =================================================================== --- sys/dev/acpica/acpi_hpet.c +++ sys/dev/acpica/acpi_hpet.c @@ -841,15 +841,28 @@ static int hpet_suspend(device_t dev) { -// struct hpet_softc *sc; + struct hpet_softc *sc; + struct hpet_timer *t; + int i; /* * Disable the timer during suspend. The timer will not lose * its state in S1 or S2, but we are required to disable * it. */ -// sc = device_get_softc(dev); -// hpet_disable(sc); + sc = device_get_softc(dev); + hpet_disable(sc); + for (i = 0; i < sc->num_timers; i++) { + t = &sc->t[i]; + + /* + * Clear timer state to minimize chances of confusing + * the firmware after resuming from S3. + */ + bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), + t->caps & ~(HPET_TCNF_INT_ENB | HPET_TCNF_TYPE)); + bus_write_4(sc->mem_res, HPET_ISR, 1 << t->num); + } return (0); }