From owner-svn-src-head@FreeBSD.ORG Wed Mar 28 13:28:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 849D0106566C; Wed, 28 Mar 2012 13:28:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9428FC0C; Wed, 28 Mar 2012 13:28:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2SDSAB4038049; Wed, 28 Mar 2012 13:28:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2SDSAc0038047; Wed, 28 Mar 2012 13:28:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203281328.q2SDSAc0038047@svn.freebsd.org> From: Alexander Motin Date: Wed, 28 Mar 2012 13:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233606 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 13:28:10 -0000 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);