Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2012 13:28:10 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r233606 - head/sys/dev/sound/pci/hda
Message-ID:  <201203281328.q2SDSAc0038047@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203281328.q2SDSAc0038047>