From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 4 13:23:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B459B16A4CE for ; Sat, 4 Dec 2004 13:23:51 +0000 (GMT) Received: from amsfep18-int.chello.nl (amsfep18-int.chello.nl [213.46.243.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20D5F43D54 for ; Sat, 4 Dec 2004 13:23:50 +0000 (GMT) (envelope-from Danovitsch@vitsch.net) Received: from Vitsch.net ([212.187.78.35]) by amsfep18-int.chello.nl (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20041204132348.OEOQ7692.amsfep18-int.chello.nl@Vitsch.net> for ; Sat, 4 Dec 2004 14:23:48 +0100 Received: from Racebeest.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Vitsch.net (8.12.3p2/8.11.3) with ESMTP id iB4DN6eD091651 for ; Sat, 4 Dec 2004 14:23:07 +0100 (CET) (envelope-from Danovitsch@vitsch.net) From: "Daan Vreeken [PA4DAN]" To: FreeBSD-Hackers@FreeBSD.org Date: Sat, 4 Dec 2004 14:23:36 +0100 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412041423.36735.Danovitsch@vitsch.net> Subject: Problem (interrupt storm) with snd_ich X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Dec 2004 13:23:51 -0000 Hi All, I'm having a problem with the snd_ich driver. Directly after loading the snd_ich module pcm0 is detected correctly, but "vmstat -i" shows about 40000 interrupts every second caused by pcm0. The problem shows up with both custom kernels and GENERIC, with or without snd_ich compiled into the kernel. After adding a printf() to the ich_intr() routine it showed that all interrupts have 0x400 (ICH_GLOB_STA_PRES) set. The ich_intr() has a comment about clearing this interrupt in the following lines : /* Clear resume interrupt(s) - nothing doing with them */ ich_wr(sc, ICH_REG_GLOB_STA, gs, 4); Although this code should clear the interrupt, this doesn't seem to work on my laptop somehow. In ich_init() ICH_GLOB_CTL_PRES gets set in the ICH_REG_GLOB_CNT register. If I remove this bit in ich_init(), the interrupt problem goes away and pcm0 works as expected. I have changed the following line in ich_init() : Original line : ich_wr(sc, ICH_REG_GLOB_CNT, ICH_GLOB_CTL_COLD | ICH_GLOB_CTL_PRES, 4); New line : ich_wr(sc, ICH_REG_GLOB_CNT, ICH_GLOB_CTL_COLD, 4); I'm not an ICH expert, so I don't know if I have just disabled a suspend/resume feature that is really needed or not, but it does solve my problem. I would like to know if anyone else has seen this problem before, and if there is a better solution to it. The relevant part of "pciconf -lv" : pcm0@pci0:2:7: class=0x040100 card=0x17631043 chip=0x70121039 rev=0xa0 hdr=0x00 vendor = 'Silicon Integrated Systems (SiS)' device = 'SiS7012 PCI Audio Accelerator' class = multimedia subclass = audio Feel free to ask for more information. I'm willing to test patches and give feedback. Thanks, Daan