NetBSD Problem Report #13430
Received: (qmail 17390 invoked from network); 11 Jul 2001 02:45:42 -0000
Message-Id: <200107110242.f6B2g2N02757@zorkmid.mit.edu>
Date: Tue, 10 Jul 2001 22:42:02 -0400 (EDT)
From: John Hawkinson <jhawk@mit.edu>
Reply-To: jhawk@mit.edu
To: gnats-bugs@gnats.netbsd.org
Subject: UHCI_DEBUG calls uhci_dump_all() independant of uhcidebug
X-Send-Pr-Version: 3.95
>Number: 13430
>Category: kern
>Synopsis: UHCI_DEBUG calls uhci_dump_all() independant of uhcidebug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 11 02:46:00 +0000 2001
>Closed-Date: Wed Jul 11 14:08:07 +0000 2001
>Last-Modified: Wed Jul 11 14:08:07 +0000 2001
>Originator: John Hawkinson
>Release: -current of 24 Jun 2001
>Organization:
MIT
>Environment:
System: NetBSD zorkmid.mit.edu 1.5W NetBSD 1.5W (ZORKMID-$Revision: 1.12 $) #104: Sun Jun 24 21:48:35 EDT 2001 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
>Description:
After some potentially sketchy usb activities, specifically
I think I suspended my machine and removed a usb serial adaptor in quick
sucession, not sure what order (I THOUGHT I took it out first), waiting
a while, and bringing the machine back up, I started getting continual
uhci_debug_all() logs.
I have uhcidebug set to zero.
It seems that uhci_intr() unconditionally calls uhci_debug_all()
in some cases. Most cases are protected by uhcidebug checks. Should
not this one be too?
>How-To-Repeat:
not sure. These are my logs:
Jul 10 16:59:52 zorkmid root: apm script: /etc/apm/suspend
Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
Jul 10 19:43:17 zorkmid last message repeated 2 times
Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1937: dmasync timeout
Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1520: dmasync timeout
Jul 10 19:43:17 zorkmid /netbsd: uhci0: host controller process error
Jul 10 19:43:20 zorkmid /netbsd: uhci0: host controller halted
Jul 10 19:43:20 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0030, intr=000f, frnu
m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
Jul 10 19:43:20 zorkmid /netbsd: intrs=1448994
Jul 10 19:43:20 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
k=00000001
Jul 10 19:43:17 zorkmid root: apm script: /etc/apm/resume
Jul 10 19:43:17 zorkmid apmd: system resumed from APM sleep
Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
k=00000001
Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
k=00000001
Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
k=00000001
>Fix:
Here's a proposed fix. As a temporary workaround, I just NOP'd the call
out of my running kernel.
Index: uhci.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/usb/uhci.c,v
retrieving revision 1.135
diff -u -r1.135 uhci.c
--- uhci.c 2001/04/01 14:59:52 1.135
+++ uhci.c 2001/07/11 02:46:24
@@ -1203,7 +1203,8 @@
USBDEVNAME(sc->sc_bus.bdev));
sc->sc_dying = 1;
#ifdef UHCI_DEBUG
- uhci_dump_all(sc);
+ if (uhcidebug > 2)
+ uhci_dump_all(sc);
#endif
}
>Release-Note:
>Audit-Trail:
From: Lennart Augustsson <lennart@mail.augustsson.net>
To: jhawk@mit.edu
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/13430: UHCI_DEBUG calls uhci_dump_all() independant of
uhcidebug
Date: Tue, 10 Jul 2001 23:26:34 -0400
This is entirely intentional.
You got a fatal error, "host controller process error", which should never
occur. In this case I think it's better to do a debug dump, because it might
be very hard to repeat. If you don't want it, don't compile with UHCI_DEBUG.
-- Lennart
John Hawkinson wrote:
> >Number: 13430
> >Category: kern
> >Synopsis: UHCI_DEBUG calls uhci_dump_all() independant of uhcidebug
> >Confidential: no
> >Severity: non-critical
> >Priority: low
> >Responsible: kern-bug-people
> >State: open
> >Class: change-request
> >Submitter-Id: net
> >Arrival-Date: Tue Jul 10 19:46:00 PDT 2001
> >Closed-Date:
> >Last-Modified:
> >Originator: John Hawkinson
> >Release: -current of 24 Jun 2001
> >Organization:
> MIT
> >Environment:
>
> System: NetBSD zorkmid.mit.edu 1.5W NetBSD 1.5W (ZORKMID-$Revision: 1.12 $) #104: Sun Jun 24 21:48:35 EDT 2001 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
>
> >Description:
> After some potentially sketchy usb activities, specifically
> I think I suspended my machine and removed a usb serial adaptor in quick
> sucession, not sure what order (I THOUGHT I took it out first), waiting
> a while, and bringing the machine back up, I started getting continual
> uhci_debug_all() logs.
>
> I have uhcidebug set to zero.
>
> It seems that uhci_intr() unconditionally calls uhci_debug_all()
> in some cases. Most cases are protected by uhcidebug checks. Should
> not this one be too?
> >How-To-Repeat:
> not sure. These are my logs:
>
> Jul 10 16:59:52 zorkmid root: apm script: /etc/apm/suspend
> Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> Jul 10 19:43:17 zorkmid last message repeated 2 times
> Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1937: dmasync timeout
> Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1520: dmasync timeout
> Jul 10 19:43:17 zorkmid /netbsd: uhci0: host controller process error
> Jul 10 19:43:20 zorkmid /netbsd: uhci0: host controller halted
> Jul 10 19:43:20 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0030, intr=000f, frnu
> m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> Jul 10 19:43:20 zorkmid /netbsd: intrs=1448994
> Jul 10 19:43:20 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> k=00000001
> Jul 10 19:43:17 zorkmid root: apm script: /etc/apm/resume
> Jul 10 19:43:17 zorkmid apmd: system resumed from APM sleep
> Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> k=00000001
> Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> k=00000001
> Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> k=00000001
>
> >Fix:
> Here's a proposed fix. As a temporary workaround, I just NOP'd the call
> out of my running kernel.
>
> Index: uhci.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/dev/usb/uhci.c,v
> retrieving revision 1.135
> diff -u -r1.135 uhci.c
> --- uhci.c 2001/04/01 14:59:52 1.135
> +++ uhci.c 2001/07/11 02:46:24
> @@ -1203,7 +1203,8 @@
> USBDEVNAME(sc->sc_bus.bdev));
> sc->sc_dying = 1;
> #ifdef UHCI_DEBUG
> - uhci_dump_all(sc);
> + if (uhcidebug > 2)
> + uhci_dump_all(sc);
> #endif
>
> }
> >Release-Note:
> >Audit-Trail:
> >Unformatted:
From: John Hawkinson <jhawk@MIT.EDU>
To: Lennart Augustsson <lennart@mail.augustsson.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/13430: UHCI_DEBUG calls uhci_dump_all() independant of uhcidebug
Date: Wed, 11 Jul 2001 09:28:49 -0400
Lennart Augustsson <lennart@mail.augustsson.net> wrote on Tue, 10 Jul 2001
at 23:26:34 -0400 in <3B4BC76A.97E2D31D@mail.augustsson.net>:
> This is entirely intentional.
> You got a fatal error, "host controller process error", which should never
> occur. In this case I think it's better to do a debug dump, because it might
> be very hard to repeat.
Well, one debug dump might be OK, but several thousand of them
gets pretty annoying, pretty fast.
> If you don't want it, don't compile with UHCI_DEBUG.
Well, here's the rub. Like most DEBUG options with a corresponding
'debug' variable, I tend to turn them on when I've had to debug
something of that nature in the past, and it's sure convenient to be
able to patch usbdebug or uhcidebug to a non-zero value in the running
kernel.
While that's certainly not a god-given right, it seems like something
we wnat to encourage stylistically.
This bucks that trend, and in a way that becomes truly annoying, impeding
actual use of the machine.
--jhawk
> > >Number: 13430
> > >Category: kern
> > >Synopsis: UHCI_DEBUG calls uhci_dump_all() independant of uhcidebug
> > >Confidential: no
> > >Severity: non-critical
> > >Priority: low
> > >Responsible: kern-bug-people
> > >State: open
> > >Class: change-request
> > >Submitter-Id: net
> > >Arrival-Date: Tue Jul 10 19:46:00 PDT 2001
> > >Closed-Date:
> > >Last-Modified:
> > >Originator: John Hawkinson
> > >Release: -current of 24 Jun 2001
> > >Organization:
> > MIT
> > >Environment:
> >
> > System: NetBSD zorkmid.mit.edu 1.5W NetBSD 1.5W (ZORKMID-$Revision: 1.12 $) #104: Sun Jun 24 21:48:35 EDT 2001 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
> >
> > >Description:
> > After some potentially sketchy usb activities, specifically
> > I think I suspended my machine and removed a usb serial adaptor in quick
> > sucession, not sure what order (I THOUGHT I took it out first), waiting
> > a while, and bringing the machine back up, I started getting continual
> > uhci_debug_all() logs.
> >
> > I have uhcidebug set to zero.
> >
> > It seems that uhci_intr() unconditionally calls uhci_debug_all()
> > in some cases. Most cases are protected by uhcidebug checks. Should
> > not this one be too?
> > >How-To-Repeat:
> > not sure. These are my logs:
> >
> > Jul 10 16:59:52 zorkmid root: apm script: /etc/apm/suspend
> > Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> > Jul 10 19:43:17 zorkmid last message repeated 2 times
> > Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1937: dmasync timeout
> > Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> > Jul 10 19:43:17 zorkmid /netbsd: fxp0: WARNING: SCB timed out!
> > Jul 10 19:43:17 zorkmid /netbsd: fxp0 at line 1520: dmasync timeout
> > Jul 10 19:43:17 zorkmid /netbsd: uhci0: host controller process error
> > Jul 10 19:43:20 zorkmid /netbsd: uhci0: host controller halted
> > Jul 10 19:43:20 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0030, intr=000f, frnu
> > m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> > Jul 10 19:43:20 zorkmid /netbsd: intrs=1448994
> > Jul 10 19:43:20 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> > k=00000001
> > Jul 10 19:43:17 zorkmid root: apm script: /etc/apm/resume
> > Jul 10 19:43:17 zorkmid apmd: system resumed from APM sleep
> > Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> > m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> > Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> > Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> > k=00000001
> > Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> > m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> > Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> > Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> > k=00000001
> > Jul 10 22:26:42 zorkmid /netbsd: uhci0 regs: cmd=0000, sts=0020, intr=000f, frnu
> > m=0728, flbase=00004ca0, sof=0040, portsc1=0080, portsc2=0080
> > Jul 10 22:26:42 zorkmid /netbsd: intrs=1448995
> > Jul 10 22:26:42 zorkmid /netbsd: QH(0xc6451f80) at 00006f80: hlink=00006fa2 elin
> > k=00000001
> >
> > >Fix:
> > Here's a proposed fix. As a temporary workaround, I just NOP'd the call
> > out of my running kernel.
> >
> > Index: uhci.c
> > ===================================================================
> > RCS file: /cvsroot/syssrc/sys/dev/usb/uhci.c,v
> > retrieving revision 1.135
> > diff -u -r1.135 uhci.c
> > --- uhci.c 2001/04/01 14:59:52 1.135
> > +++ uhci.c 2001/07/11 02:46:24
> > @@ -1203,7 +1203,8 @@
> > USBDEVNAME(sc->sc_bus.bdev));
> > sc->sc_dying = 1;
> > #ifdef UHCI_DEBUG
> > - uhci_dump_all(sc);
> > + if (uhcidebug > 2)
> > + uhci_dump_all(sc);
> > #endif
> >
> > }
> > >Release-Note:
> > >Audit-Trail:
> > >Unformatted:
State-Changed-From-To: open->closed
State-Changed-By: augustss
State-Changed-When: Wed Jul 11 07:07:46 PDT 2001
State-Changed-Why:
The dump should only happen once now.
>Unformatted:
(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.