From nobody@FreeBSD.org  Wed Oct 31 04:05:41 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B035B37B406
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 31 Oct 2001 04:05:40 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f9VC5eF52774;
	Wed, 31 Oct 2001 04:05:40 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200110311205.f9VC5eF52774@freefall.freebsd.org>
Date: Wed, 31 Oct 2001 04:05:40 -0800 (PST)
From: sehh <sehh@altered.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: USB controller driver will die after some hours/heavy load.
X-Send-Pr-Version: www-1.0

>Number:         31659
>Category:       kern
>Synopsis:       USB controller driver will die after some hours/heavy load.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-usb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 31 04:10:01 PST 2001
>Closed-Date:    Mon Jan 10 03:51:50 GMT 2005
>Last-Modified:  Mon Jan 10 03:51:50 GMT 2005
>Originator:     sehh
>Release:        4.4-RELEASE
>Organization:
>Environment:
FreeBSD thinkpad 4.4-RELEASE FreeBSD 4.4-RELEASE #1: Sat Oct 27 18:23:45 GMT 2001
root@thinkpad:/usr/src/sys/compile/THINKPAD i386
>Description:
The USB kernel driver will die. It happens after
about 20 or so hours, of full processing.

I'm using an Alcatel SpeedTouch ADSL USB modem,
and after 20 hours of been connected and using
full bandwidth, the kernel will report:

/kernel: usb0: host controller process error
/kernel: usb0: host controller halted

The last message is repeated forever on the console.

Machine info:
IBM ThinkPad 600E
366mhz 64meg ram 10gig hd.

>How-To-Repeat:
Not very easy to repeat, you need to have some
high speed USB device (ADSL style) and to have
it working for 20 or so hours.

>Fix:

>Release-Note:
>Audit-Trail:

From: David Hanney <dhathome@digitalbrain.com>
To: freebsd-gnats-submit@FreeBSD.org, sehh@altered.com
Cc:  
Subject: Re: kern/31659: USB controller driver will die after some
  hours/heavy load.
Date: Mon, 21 Jan 2002 22:02:49 +0000

 I can duplicate this
 and on a much more recent version ...
 
 uname:
 FreeBSD pizza.house 4.5-RC FreeBSD 4.5-RC #0: Wed Jan 16 21:22:20 GMT 
 2002     dave@pizza.house:/usr/src/sys/compile/GENERIC  i386
 
 cvsuped:
 from RELENG_4 on 2002.01.14.00.00.00
 
 dmesg:
 Copyright (c) 1992-2002 The FreeBSD Project.
 Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
          The Regents of the University of California. All rights reserved.
 FreeBSD 4.5-RC #0: Wed Jan 16 21:22:20 GMT 2002
      dave@pizza.house:/usr/src/sys/compile/GENERIC
 Timecounter "i8254"  frequency 1193182 Hz
 CPU: Pentium III/Pentium III Xeon/Celeron (697.88-MHz 686-class CPU)
    Origin = "GenuineIntel"  Id = 0x683  Stepping = 3
    Features=0x387f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PA
 T,PSE36,PN,MMX,FXSR,SSE>
 real memory  = 267124736 (260864K bytes)
 avail memory = 255029248 (249052K bytes)
 Preloaded elf kernel "kernel" at 0xc0491000.
 Pentium Pro MTRR support enabled
 md0: Malloc disk
 Using $PIR table, 10 entries at 0xc00f3230
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 pcib0: <Intel 82810E (i810E GMCH) Host To Hub bridge> on motherboard
 pci0: <PCI bus> on pcib0
 pci0: <Intel 82810E (i810E GMCH) SVGA controller> at 1.0 irq 11
 pcib1: <Intel 82801AA (ICH) Hub to PCI bridge> at device 30.0 on pci0
 pci1: <PCI bus> on pcib1
 fxp0: <Intel Pro 10/100B/100+ Ethernet> port 0xde80-0xdebf mem 
 0xff700000-0xff7f
 ffff,0xff8fe000-0xff8fefff irq 9 at device 1.0 on pci1
 fxp0: Ethernet address 00:d0:b7:b5:ef:4d
 inphy0: <i82555 10/100 media interface> on miibus0
 inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 pci1: <unknown card> (vendor=0x1274, dev=0x1371) at 7.0 irq 10
 isab0: <Intel 82801AA (ICH) PCI to LPC bridge> at device 31.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <Intel ICH ATA66 controller> port 0xffa0-0xffaf at device 31.1 on pci0
 ata0: at 0x1f0 irq 14 on atapci0
 ata1: at 0x170 irq 15 on atapci0
 uhci0: <Intel 82801AA (ICH) USB controller> port 0xef80-0xef9f irq 9 at 
 device 3
 1.2 on pci0
 usb0: <Intel 82801AA (ICH) USB controller> on uhci0
 usb0: USB revision 1.0
 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 ugen0: ALCATEL Speed Touch USB , rev 1.10/0.00, addr 2
 pci0: <unknown card> (vendor=0x8086, dev=0x2413) at 31.3 irq 0
 orm0: <Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc8fff on isa0
 fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
 fdc0: FIFO enabled, 8 bytes threshold
 fd0: <1440-KB 3.5" drive> on fdc0 drive 0
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
 sio0: type 16550A
 sio1 at port 0x2f8-0x2ff irq 3 on isa0
 sio1: type 16550A
 ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 ata1-slave: ata_command: timeout waiting for intr
 ata1-slave: identify failed
 ad0: 19536MB <ST320423A> [39693/16/63] at ata0-master UDMA66
 ad1: 95562MB <Maxtor 4W100H6> [194158/16/63] at ata0-slave UDMA66
 acd0: CDROM <CD-224E> at ata1-master using PIO4
 
 from /var/log/messages:
 Jan 21 19:05:46 pizza /kernel: usb0: host controller process error
 Jan 21 19:05:46 pizza /kernel: usb0: host controller halted
 Jan 21 19:06:29 pizza last message repeated 3 times
 Jan 21 19:08:32 pizza last message repeated 14 times
 etc...
 
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu Jan 31 05:06:51 PST 2002 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31659 

From: "David Hedley" <david@inty.net>
To: "freebsd-gnats-submit@FreeBSD. org" <freebsd-gnats-submit@FreeBSD.org>,
	<sehh@altered.com>
Cc:  
Subject: Re: kern/31659: USB controller driver will die after some hours/heavy load.
Date: Thu, 11 Jul 2002 17:00:44 +0100

 I use the following code to restart the USB after this occurence.
 It seems to work OK for me.
 
 Any comments?
 
 
 *** /usr/src/sys/dev/usb/uhci.c Tue Oct 31 23:23:29 2000
 --- usb/uhci.c  Wed Jul 10 12:22:54 2002
 ***************
 *** 962,970 ****
                        USBDEVNAME(sc->sc_bus.bdev));
         }
         if (status & UHCI_STS_HCH) {
 !               /* no acknowledge needed */
 !               printf("%s: host controller halted\n",=20
 !                      USBDEVNAME(sc->sc_bus.bdev));
         }
  =20
         if (ack)        /* acknowledge the ints */
 --- 962,990 ----
                        USBDEVNAME(sc->sc_bus.bdev));
         }
         if (status & UHCI_STS_HCH) {
 !                 int s;
 !  =20
 !                 /* no acknowledge needed */
 !                 printf("%s: host controller halted\n",=20
 !                        USBDEVNAME(sc->sc_bus.bdev));
 ! =20
 !                 /* Try to restart */
 !                 printf("DCRH: Restarting USB controller\n");
 !                 s =3D splusb();
 !                 sc->sc_bus.use_polling++; /* Switch to polling in case =
 curproc=3DNULL */
 !  =20
 !                 UWRITE2(sc, UHCI_STS, 0xFFFF);  /* ack pending =
 interrupts */
 !                 uhci_run(sc, 0);                /* stop the controller =
 */
 !                 UWRITE2(sc, UHCI_INTR, 0);      /* disable interrupts =
 */
 !                 uhci_busreset(sc);
 !                 UWRITE2(sc, UHCI_INTR, UHCI_INTR_TOCRCIE | =
 UHCI_INTR_RIE |
 !                         UHCI_INTR_IOCE | UHCI_INTR_SPIE);       /* =
 enable interrupts */
 !                 UHCICMD(sc, UHCI_CMD_MAXP); /* Assume 64 byte packets =
 at frame end */
 !                 uhci_run(sc, 1);               /* and here we go... */
 !                 sc->sc_bus.use_polling--;
 !                 splx(s);
 !                 ack =3D 0;
 !                 printf("DCRH: USB controller restarted\n");
         }
  =20
         if (ack)        /* acknowledge the ints */
 
 
 intY has scanned this email for all known viruses (www.inty.com)
 
 
State-Changed-From-To: open->analyzed 
State-Changed-By: joe 
State-Changed-When: Tue Oct 14 01:20:27 PDT 2003 
State-Changed-Why:  
This is definitely bug in the USB stack.  The author is recommended to try 
the patch at http://www.josef-k.net/misc/RELENG_4-USB-20031005.patch.gz, or 
to wait until after 4.9 has been released when this will be committed to -stable. 


Responsible-Changed-From-To: n_hibma->joe 
Responsible-Changed-By: joe 
Responsible-Changed-When: Tue Oct 14 01:20:27 PDT 2003 
Responsible-Changed-Why:  
This is definitely bug in the USB stack.  The author is recommended to try 
the patch at http://www.josef-k.net/misc/RELENG_4-USB-20031005.patch.gz, or 
to wait until after 4.9 has been released when this will be committed to -stable. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31659 

From: andre post <apostbackup@yahoo.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/31659: USB controller driver will die after some hours/heavy load.
Date: Tue, 11 May 2004 04:13:01 -0700 (PDT)

 This usb driver memory leak is also observed in 5.x
 kernels. I have submitted a PR for this (kern/66324).
 Could the drivers in the 5.x branch be updated with
 the proposed patch?
 
 
 	
 		
 __________________________________
 Do you Yahoo!?
 Win a $20,000 Career Makeover at Yahoo! HotJobs  
 http://hotjobs.sweepstakes.yahoo.com/careermakeover 
Responsible-Changed-From-To: joe->freebsd-usb 
Responsible-Changed-By: joe 
Responsible-Changed-When: Wed Nov 10 10:54:30 GMT 2004 
Responsible-Changed-Why:  
Hand this over to the usb mailling list. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=31659 

From: Julian Elischer <julian@elischer.org>
To: freebsd-gnats-submit@FreeBSD.org, sehh@altered.com,
	apostbackup@yahoo.com, david@inty.net
Cc:  
Subject: Re: kern/31659: USB controller driver will die after some hours/heavy
 load.
Date: Mon, 03 Jan 2005 21:59:56 -0800

 I this still a problem for you?
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/31659

From: Dimitrios <sehh@altered.com>
To: freebsd-gnats-submit@FreeBSD.org, sehh@altered.com
Cc:  
Subject: Re: kern/31659: USB controller driver will die after some
 hours/heavy load.
Date: Tue, 4 Jan 2005 18:47:08 +0200

 I can't confirm if this bug still exists or not, since i've moved to a DSL router/hub instead.
State-Changed-From-To: analyzed->closed 
State-Changed-By: julian 
State-Changed-When: Mon Jan 10 03:50:40 GMT 2005 
State-Changed-Why:  
I believe this to have been fixed during the stack upgrade. 
Unable to confirm the continued existance of the bug. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=31659 
>Unformatted:
