svn commit: r233606 - head/sys/dev/sound/pci/hda
Alexander Motin
mav at FreeBSD.org
Wed Mar 28 13:28:10 UTC 2012
Author: mav
Date: Wed Mar 28 13:28:09 2012
New Revision: 233606
URL: http://svn.freebsd.org/changeset/base/233606
Log:
Stop HDA controller polling callout on suspend and reset it on resume.
PR: kern/166382
MFC after: 1 week
Modified:
head/sys/dev/sound/pci/hda/hdac.c
Modified: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c Wed Mar 28 12:46:12 2012 (r233605)
+++ head/sys/dev/sound/pci/hda/hdac.c Wed Mar 28 13:28:09 2012 (r233606)
@@ -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);
More information about the svn-src-head
mailing list