static bool auich_resume(device_t dv PMF_FN_ARGS) { struct auich_softc *sc = device_private(dv); pcireg_t v; if (sc->sc_native_mode) { v = pci_conf_read(sc->sc_pc, sc->sc_pt, ICH_CFG); pci_conf_write(sc->sc_pc, sc->sc_pt, ICH_CFG, v | ICH_CFG_IOSE); } auich_reset_codec(sc); DELAY(1000); (sc->codec_if->vtbl->restore_ports)(sc->codec_if); return true; }
static bool auich_resume(device_t dv, const pmf_qual_t *qual) { struct auich_softc *sc = device_private(dv); pcireg_t v; mutex_enter(&sc->sc_lock); mutex_spin_enter(&sc->sc_intr_lock); if (sc->sc_iose) { v = pci_conf_read(sc->sc_pc, sc->sc_pt, ICH_CFG); pci_conf_write(sc->sc_pc, sc->sc_pt, ICH_CFG, v | ICH_CFG_IOSE); } auich_reset_codec(sc); mutex_spin_exit(&sc->sc_intr_lock); DELAY(1000); (sc->codec_if->vtbl->restore_ports)(sc->codec_if); mutex_exit(&sc->sc_lock); return true; }