diff options
author | mav <mav@FreeBSD.org> | 2012-03-28 13:28:09 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2012-03-28 13:28:09 +0000 |
commit | 42f863a90715a10bf219c755c032bd6031474489 (patch) | |
tree | 9b601b3803722371c8219828b78f1f2d77b76d9b | |
parent | 3ce0f78a89a484d329752d0ef3ef8a27de37a24d (diff) | |
download | FreeBSD-src-42f863a90715a10bf219c755c032bd6031474489.zip FreeBSD-src-42f863a90715a10bf219c755c032bd6031474489.tar.gz |
Stop HDA controller polling callout on suspend and reset it on resume.
PR: kern/166382
MFC after: 1 week
-rw-r--r-- | sys/dev/sound/pci/hda/hdac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 90f3181..c567a29 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1558,8 +1558,10 @@ hdac_suspend(device_t dev) HDA_BOOTHVERBOSE( device_printf(dev, "Reset controller...\n"); ); + callout_stop(&sc->poll_callout); hdac_reset(sc, 0); hdac_unlock(sc); + callout_drain(&sc->poll_callout); taskqueue_drain(taskqueue_thread, &sc->unsolq_task); HDA_BOOTHVERBOSE( device_printf(dev, "Suspend done\n"); @@ -1608,6 +1610,7 @@ hdac_resume(device_t dev) HDAC_GCTL_UNSOL); HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, HDAC_INTCTL_CIE | HDAC_INTCTL_GIE); DELAY(1000); + hdac_poll_reinit(sc); hdac_unlock(sc); error = bus_generic_resume(dev); |