NetBSD Problem Report #11410

Received: (qmail 10070 invoked from network); 2 Nov 2000 12:21:53 -0000
Message-Id: <20001102122151.00D291A40E@kafka.testbed.era.ericsson.se>
Date: Thu,  2 Nov 2000 13:21:51 +0100 (CET)
From: eramore@era-t.ericsson.se
Sender: mer@kafka.testbed.era.ericsson.se
Reply-To: eramore@era-t.ericsson.se
To: gnats-bugs@gnats.netbsd.org
Cc: eramore@era-t.ericsson.se
Subject: cnw prints a lot of "spurious interrupt"
X-Send-Pr-Version: 3.95

>Number:         11410
>Category:       kern
>Synopsis:       cnw prints a lot of "spurious interrupt"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 02 12:22:00 +0000 2000
>Closed-Date:    Sun Nov 22 21:20:12 +0000 2009
>Last-Modified:  Sun Nov 22 21:35:00 +0000 2009
>Originator:     Michael Eriksson
>Release:        1.5_BETA (the same problem is in -current)
>Organization:
Ericsson Radio Systems AB
>Environment:
System: NetBSD kafka 1.5_BETA NetBSD 1.5_BETA (KAFKA) #0: Mon Oct 23 12:16:38 CEST 2000 mer@kafka:/usr/src/sys/arch/i386/compile/KAFKA i386

>Description:

The cnw driver prints to the console when it gets a spurious
interrupt. This is reasonable when the PCMCIA bus is controlled by a
ISA-bus PCIC, which gives a separate irq to each PCMCIA bus. My
Thinkpad 570E, on the other hand, has a TI1450 PCI cardbus controller,
which has one of its cardbus slots wired to the same "PCI interrupt"
as the clcs audio chip. It's not a good idea to have the cnw driver
print "spurious interrupt" for each clcs interrupt... :-)

>How-To-Repeat:

Use a Xircom Netwave wireless LAN card while listening to your
favorite MP3 music on a Thinkpad 570E and watch a lot of "cnw0:
spurious interrupt" get printed on the console.

>Fix:

Index: if_cnw.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pcmcia/if_cnw.c,v
retrieving revision 1.11.2.2
diff -u -r1.11.2.2 if_cnw.c
--- if_cnw.c	2000/10/17 23:20:53	1.11.2.2
+++ if_cnw.c	2000/11/02 12:01:37
@@ -948,9 +948,12 @@
 		    sc->sc_memoff + CNW_IOM_OFF + CNW_REG_CCSR);
 #endif
 		if (!(status & 0x02)) {
-			if (ret == 0)
-				printf("%s: spurious interrupt\n",
-				    sc->sc_dev.dv_xname);
+#ifdef CNW_DEBUG
+			if (sc->sc_ethercom.ec_if.if_flags & IFF_DEBUG)
+				if (ret == 0)
+					printf("%s: spurious interrupt\n",
+					    sc->sc_dev.dv_xname);
+#endif
 			return (ret);
 		}
 		ret = 1;
>Release-Note:
>Audit-Trail:

From: Jason R Thorpe <thorpej@zembu.com>
To: eramore@era-t.ericsson.se
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/11410: cnw prints a lot of "spurious interrupt"
Date: Thu, 2 Nov 2000 06:52:01 -0800

 On Thu, Nov 02, 2000 at 01:21:51PM +0100, eramore@era-t.ericsson.se wrote:

  > Index: if_cnw.c
  > ===================================================================
  > RCS file: /cvsroot/syssrc/sys/dev/pcmcia/if_cnw.c,v
  > retrieving revision 1.11.2.2
  > diff -u -r1.11.2.2 if_cnw.c
  > --- if_cnw.c	2000/10/17 23:20:53	1.11.2.2
  > +++ if_cnw.c	2000/11/02 12:01:37
  > @@ -948,9 +948,12 @@
  >  		    sc->sc_memoff + CNW_IOM_OFF + CNW_REG_CCSR);
  >  #endif
  >  		if (!(status & 0x02)) {
  > -			if (ret == 0)
  > -				printf("%s: spurious interrupt\n",
  > -				    sc->sc_dev.dv_xname);
  > +#ifdef CNW_DEBUG
  > +			if (sc->sc_ethercom.ec_if.if_flags & IFF_DEBUG)
  > +				if (ret == 0)
  > +					printf("%s: spurious interrupt\n",
  > +					    sc->sc_dev.dv_xname);
  > +#endif

 Actually, the printf should probably be removed entirely... interrupts
 may be shared, so it may be perfectly legitimate for this to occur.

 -- 
         -- Jason R. Thorpe <thorpej@zembu.com>

From: Michael Eriksson <Michael.Eriksson@era-t.ericsson.se>
To: thorpej@zembu.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/11410: cnw prints a lot of "spurious interrupt"
Date: Thu, 2 Nov 2000 16:03:46 +0100 (CET)

 Jason R Thorpe wrote:
 > Actually, the printf should probably be removed entirely... interrupts
 > may be shared, so it may be perfectly legitimate for this to occur.

 Yeah, maybe. But the debug mode is extremely verbose anyway, and
 spurious interrupts are interresting when debugging a driver. I guess
 you have to shut gqmpeg off when you do ifconfig debug. :-)

 -- 
 Michael Eriksson <eramore@era-t.ericsson.se>
 NO CARRIER
State-Changed-From-To: open->closed
State-Changed-By: dsl@NetBSD.org
State-Changed-When: Sun, 22 Nov 2009 21:20:12 +0000
State-Changed-Why:
message deleted


From: David Laight <dsl@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/11410 CVS commit: src/sys/dev/pcmcia
Date: Sun, 22 Nov 2009 21:18:42 +0000

 Module Name:	src
 Committed By:	dsl
 Date:		Sun Nov 22 21:18:42 UTC 2009

 Modified Files:
 	src/sys/dev/pcmcia: if_cnw.c

 Log Message:
 Remove "splurious interrupt" message. The IRQ might be shared.
 Fixes PR/11410


 To generate a diff of this commit:
 cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pcmcia/if_cnw.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.