From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266906AbUBMLMh (ORCPT ); Fri, 13 Feb 2004 06:12:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266919AbUBMLMh (ORCPT ); Fri, 13 Feb 2004 06:12:37 -0500 Received: from ns.suse.de ([195.135.220.2]:17367 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S266906AbUBMLMf (ORCPT ); Fri, 13 Feb 2004 06:12:35 -0500 Date: Fri, 13 Feb 2004 12:05:02 +0100 Message-ID: From: Takashi Iwai To: Ralf Gerbig Cc: Linus Torvalds , Lenar =?ISO-8859-1?Q?L=F5hmus?= , Linux Kernel Mailinglist Subject: Re: irq 7: nobody cared! (intel8x0 sound / 2.6.2-rc3-mm1) In-Reply-To: References: <4023BEA8.5060306@vision.ee> <4029143B.30408@vision.ee> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 MULE XEmacs/21.4 (patch 13) (Rational FORTRAN) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Fri_Feb_13_12:05:02_2004-1" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --Multipart_Fri_Feb_13_12:05:02_2004-1 Content-Type: text/plain; charset=US-ASCII At 11 Feb 2004 21:11:08 +0100, Ralf Gerbig wrote: > > - return IRQ_NONE; /* not for us */ > + return IRQ_RETVAL(status); /* not for us */ after checking the code again, using status as IRQ_RETVAL() isn't a good way, because it has also some static status bits. the attached patch would be better to avoid the confusion. it will return IRQ_HANDLED only when some irq bits are really acknowledged. Takashi --Multipart_Fri_Feb_13_12:05:02_2004-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/pci/intel8x0.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.115 diff -u -r1.115 intel8x0.c --- alsa-kernel/pci/intel8x0.c 6 Feb 2004 17:47:49 -0000 1.115 +++ alsa-kernel/pci/intel8x0.c 13 Feb 2004 10:32:46 -0000 @@ -804,10 +804,20 @@ spin_lock(&chip->reg_lock); status = igetdword(chip, chip->int_sta_reg); if ((status & chip->int_sta_mask) == 0) { - if (status) + static int status_ack = 0; + static int err_count = 10; + if (status) { iputdword(chip, chip->int_sta_reg, status); + status_ack = igetdword(chip, chip->int_sta_reg); + } spin_unlock(&chip->reg_lock); - return IRQ_NONE; + status ^= status_ack; + if (status && err_count) { + err_count--; + snd_printd("intel8x0: unknown IRQ bits 0x%x (sta_mask=0x%x)\n", + status, chip->int_sta_mask); + } + return IRQ_RETVAL(status); } for (i = 0; i < chip->bdbars_count; i++) { --Multipart_Fri_Feb_13_12:05:02_2004-1--