Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Dec 2004 14:23:36 +0100
From:      "Daan Vreeken [PA4DAN]" <Danovitsch@vitsch.net>
To:        FreeBSD-Hackers@FreeBSD.org
Subject:   Problem (interrupt storm) with snd_ich
Message-ID:  <200412041423.36735.Danovitsch@vitsch.net>

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



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