NetBSD Problem Report #8666

Received: (qmail 21336 invoked from network); 22 Oct 1999 20:51:47 -0000
Message-Id: <199910222029.NAA20558@cobalt.plectere.com>
Date: Fri, 22 Oct 1999 13:29:39 -0700 (PDT)
From: paul@plectere.com
Reply-To: paul@plectere.com
To: gnats-bugs@gnats.netbsd.org
Subject: incorrect usb kernel DIAGNOSTIC printf in uhci.c
X-Send-Pr-Version: 3.95

>Number:         8666
>Category:       kern
>Synopsis:       USB diagnostic printf in uhci.c is extremely noisy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 22 13:54:00 +0000 1999
>Closed-Date:    Sat Oct 23 00:21:03 +0000 1999
>Last-Modified:  Sat Oct 23 00:21:24 +0000 1999
>Originator:     Paul Shupak
>Release:        Fri Oct 22 13:11:35 PDT 1999
>Organization:
>Environment:
System: NetBSD cobalt 1.4L NetBSD 1.4L (COBALT) #213: Thu Oct 21 22:12:57 PDT 1999 paul@cobalt:/usr/src/sys/arch/i386/compile/COBALT i386


>Description:

	The code contains a DIAGNOSTIC printf which references an as yet
	uninitialized value AND the condition may be triggered by normal
	operation if interrupts are shared.

>How-To-Repeat:

	a)	Build a kernel w/ option DIAGNOSTIC and "uhci*  at pci?" line
	b)	Run the kernel on a machine which shares the interrupt
		mappings of both a uhci USB and some other device.
		e.g. 
			uhci0: interrupting at irq 9
			ahc0: interrupting at irq 9
	c) Watch the endless stream of "uhci_intr: suspended sts=0x..." messages

>Fix:

*** uhci.c-ORIG	Thu Oct 21 22:12:10 1999
--- uhci.c	Thu Oct 21 22:12:15 1999
***************
*** 846,857 ****
  	}
  #endif

  #if defined(DIAGNOSTIC) && defined(__NetBSD__)
  	if (sc->sc_suspend != PWR_RESUME)
  		printf("uhci_intr: suspended sts=0x%x\n", status);
  #endif

- 	status = UREAD2(sc, UHCI_STS);
  	ack = 0;
  	if (status & UHCI_STS_USBINT)
  		ack |= UHCI_STS_USBINT;
--- 846,861 ----
  	}
  #endif

+ 	status = UREAD2(sc, UHCI_STS);
+ 	/* We may be sharing this interrupt with another PCI device */
+ 	if (status == 0)
+ 		return 0;
+ 
  #if defined(DIAGNOSTIC) && defined(__NetBSD__)
  	if (sc->sc_suspend != PWR_RESUME)
  		printf("uhci_intr: suspended sts=0x%x\n", status);
  #endif

  	ack = 0;
  	if (status & UHCI_STS_USBINT)
  		ack |= UHCI_STS_USBINT;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: augustss 
State-Changed-When: Fri Oct 22 17:21:03 PDT 1999 
State-Changed-Why:  
Patch applied. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.