From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: PATCH - MIDI on ice1724 - real-time kernel problem SOLVED(?) Date: Fri, 27 Jun 2008 16:24:49 +0200 Message-ID: References: <20080520112539.81C9D2484D@alsa0.perex.cz> <483847ED.8050208@gmx.de> <483A6D6F.1050108@insite.cz> <483A96E8.8090507@gmx.de> <483AE54C.3090807@gmx.de> <483D48DE.1010105@gmx.de> <483E78E7.4020106@insite.cz> <20080529140349.115520@gmx.net> <483ED652.6020805@insite.cz> <484AFF77.3030901@insite.cz> <4860D57E.10509@gmx.de> <4864039B.7020405@gmx.de> <4864F121.8050405@insite.cz> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 000EF24464 for ; Fri, 27 Jun 2008 16:24:50 +0200 (CEST) In-Reply-To: <4864F121.8050405@insite.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Pavel Hofman Cc: alsa-devel@alsa-project.org, Martin =?ISO-8859-1?Q?Kr=FCger?= List-Id: alsa-devel@alsa-project.org At Fri, 27 Jun 2008 15:54:41 +0200, Pavel Hofman wrote: > = > Martin Kr=FCger wrote: > > Martin Kr=FCger schrieb: > >> Hi Pavel, > >> > >> sorry for the long break, i was really busy at studying. > >> > >> ---snip--- > >> > >> Thanks a lot, > >> Martin > >> _______________________________________________ > >> Alsa-devel mailing list > >> Alsa-devel@alsa-project.org > >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > >> = > > = > > Hi again, > > = > > i did some other playing around this evening. (Debugging would be a wor= d = > > much too big...) > > = > > I commented out the logic stuff in the following subroutines of the = > > ice1724.c: > > = > > - static int vt1724_midi_output_open(struct snd_rawmidi_substream *s) > > - static int vt1724_midi_output_close(struct snd_rawmidi_substream *s) > > - static void vt1724_midi_output_trigger(struct snd_rawmidi_substream = > > *s, int up) > > - static void vt1724_midi_output_drain(struct snd_rawmidi_substream *s) > > = > > The vt1724_enable_midi_irq(s, VT1724_IRQ_MPU_TX, 1) is killing my = > > kernel, i don't know why. > = > So enabling the MPU TX interrupt causes lockup. Very similar to my = > experience with the previous version of the MIDI driver. Please put a = > debug line to snd_vt1724_interrupt, listing status bits for each = > interrupt. That was the place I experienced loops etc. In my case the = > flood eventually fooled the logging facility, but I could still read the = > first few logs. > = > = > > On the input side everything works, so i am a bit confused. Again. ;-) > = > I was also getting only TX interrupt floods, RX was OK. If it's about TX, the patch below might stop lockup (but TX must be still buggy)... Takashi --- diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index e596d77..b499328 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -382,23 +382,25 @@ static irqreturn_t snd_vt1724_interrupt(int irq, void= *dev_id) unsigned char status_mask =3D VT1724_IRQ_MPU_RX | VT1724_IRQ_MPU_TX | VT1724_IRQ_MTPCM; int handled =3D 0; -#ifdef CONFIG_SND_DEBUG int timeout =3D 0; -#endif = while (1) { status =3D inb(ICEREG1724(ice, IRQSTAT)); status &=3D status_mask; if (status =3D=3D 0) break; -#ifdef CONFIG_SND_DEBUG if (++timeout > 10) { - printk(KERN_ERR - "ice1724: Too long irq loop, status =3D 0x%x\n", - status); + status =3D inb(ICEREG1724(ice, IRQSTAT)); + printk(KERN_ERR "ice1724: Too long irq loop, " + "status =3D 0x%x\n", status); + if (status & VT1724_IRQ_MPU_TX) { + printk(KERN_ERR "ice1724: Disabling MPU_TX\n"); + outb(inb(ICEREG1724(ice, IRQMASK)) & + ~VT1724_IRQ_MPU_TX, + ICEREG1724(ice, IRQMASK)); + } break; } -#endif handled =3D 1; = if (status & VT1724_IRQ_MPU_TX) { spin_lock(&ice->reg_lock); @@ -2410,8 +2412,10 @@ static int __devinit snd_vt1724_create(struct snd_ca= rd *card, } = /* unmask used interrupts */ +#if 0 /* these are enabled/disabled dynamically */ mask =3D VT1724_IRQ_MPU_RX | VT1724_IRQ_MPU_TX; outb(mask, ICEREG1724(ice, IRQMASK)); +#endif /* don't handle FIFO overrun/underruns (just yet), * since they cause machine lockups */