From ade@lovett.com  Tue Nov 25 10:36:02 2003
Return-Path: <ade@lovett.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 42E1316A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 25 Nov 2003 10:36:02 -0800 (PST)
Received: from mail.lovett.com (core.lovett.com [216.168.8.20])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A0A0843FCB
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 25 Nov 2003 10:36:01 -0800 (PST)
	(envelope-from ade@lovett.com)
Received: from ade by mail.lovett.com with local (Exim 4.24; FreeBSD 4.9)
	id 1AOi2b-000F19-Fj
	for FreeBSD-gnats-submit@freebsd.org; Tue, 25 Nov 2003 18:36:01 +0000
Message-Id: <E1AOi2b-000F19-Fj@mail.lovett.com>
Date: Tue, 25 Nov 2003 18:36:01 +0000
From: Ade Lovett <ade@FreeBSD.org>
Reply-To: Ade Lovett <ade@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Broken USB with 5.x on ASUS A7V8X-X
X-Send-Pr-Version: 3.113
X-GNATS-Notify: iedowse

>Number:         59687
>Category:       kern
>Synopsis:       Broken USB with 5.x on ASUS A7V8X-X
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    joe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 25 10:40:15 PST 2003
>Closed-Date:    Mon Aug 02 17:19:19 GMT 2004
>Last-Modified:  Mon Aug 02 17:19:19 GMT 2004
>Originator:     Ade Lovett
>Release:        FreeBSD 5.2-BETA i386
>Organization:
>Environment:
System: FreeBSD scythe.lovett.com 5.2-BETA FreeBSD 5.2-BETA #0: Mon Nov 24 09:58:36 PST 2003 root@scythe.lovett.com:/usr/obj/usr/src/sys/GENERIC_SMALL i386

	ASUS A7V8X-X motherboard (6 onboard USB 2.0 ports)
	1 USB device - MS optical cordless intellimouse

>Description:
	USB subsystem completely fails to initialize, either with USB
	in the kernel, or as modules:

uhci0: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 21 at device 16.0 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xa800-0xa81f irq 21 at device 16.1 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub0: port error, restarting port 1
uhub0: port error, giving up port 1
uhci2: <VIA 83C572 USB controller> port 0xa400-0xa41f irq 21 at device 16.2 on pci0
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub1: port error, restarting port 1
uhub1: port error, giving up port 1
uhub1: port error, restarting port 2
uhub1: port error, giving up port 2
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xf1000000-0xf10000ff irq 21 at device 16.3 on pci0
ehci_pci_attach: companion usb0
ehci_pci_attach: companion usb1
ehci_pci_attach: companion usb2
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
uhub0: port error, restarting port 2
uhub0: port error, giving up port 2
uhub0: port error, restarting port 1
uhub0: port error, giving up port 1
usb3: <EHCI (generic) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: (0x1106) EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
uhub2: port error, restarting port 1
uhub2: port error, giving up port 1
uhub2: port error, restarting port 2
uhub2: port error, giving up port 2

	No mouse detected at all, and the ports are all dead,
	unresponsive to connecting/disconnecting ANY USB device.

	Both OpenBSD and NetBSD have similar issues, though they
	do at least manage to see a mouse before cratering.

>How-To-Repeat:

	Buy ASUS A7V8X-X mobo.  Install.  Insert 5-CURRENT snap CD.
	Boot.  Watch failures.

>Fix:

	No idea, but I doubt the choice of static of dynamic linking
	has any bearing on the matter...


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->joe 
Responsible-Changed-By: znerd 
Responsible-Changed-When: Mon Jan 5 02:39:46 PST 2004 
Responsible-Changed-Why:  
Assigning to USB maintainer. 

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

From: Thorsten Steentjes <tst@guug.de>
To: freebsd-gnats-submit@FreeBSD.org, ade@FreeBSD.org
Cc:  
Subject: Re: kern/59687: Broken USB with 5.x on ASUS A7V8X-X
Date: Sun, 15 Feb 2004 13:37:41 +0100

 --+pHx0qQiF2pBVqBT
 Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6"
 Content-Disposition: inline
 
 
 --IJpNTDwzlM2Ie8A6
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hello,
 
 I have the same error as described in kern/59687 with a MSI K7T Turbo2
 motherboard running FreeBSD 5.2.1-RC2.=20
 Please find attached my dmesg.boot.
 
 Cheers,
 Thorsten
 --
 /* Thorsten Steentjes, Martin-Luther-Str. 8, 53919 Weilerswist, Germany */
 /* Phone: +49 2254601458 | Fax: +49 2254601459 | Mobile: +49 1702105181 */
 /* Please remember: rm -rf means "read mail -really fast"               */
 
 --IJpNTDwzlM2Ie8A6
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: attachment; filename="dmesg.boot"
 
 Copyright (c) 1992-2004 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 5.2.1-RC2 #2: Sun Feb 15 13:14:35 CET 2004
     root@ontario.tm.priv:/usr/obj/usr/src/sys/ONTARIO
 Preloaded elf kernel "/boot/kernel/kernel" at 0xc0807000.
 Preloaded elf module "/boot/modules/snd_pcm.ko" at 0xc08071f4.
 Preloaded elf module "/boot/modules/acpi.ko" at 0xc08072a4.
 ACPI APIC Table: <VIA694 MSI ACPI>
 Timecounter "i8254" frequency 1193182 Hz quality 0
 CPU: AMD Athlon(tm) XP 2000+ (1660.03-MHz 686-class CPU)
   Origin = "AuthenticAMD"  Id = 0x680  Stepping = 0
   Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
   AMD Features=0xc0400000<AMIE,DSP,3DNow!>
 real memory  = 536805376 (511 MB)
 avail memory = 511770624 (488 MB)
 ioapic0 <Version 1.1> irqs 0-23 on motherboard
 Pentium Pro MTRR support enabled
 npx0: [FAST]
 npx0: <math processor> on motherboard
 npx0: INT 16 interface
 acpi0: <VIA694 MSI ACPI> on motherboard
 pcibios: BIOS version 2.10
 Using $PIR table, 9 entries at 0xc00fd5d0
 acpi0: Power Button (fixed)
 Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000
 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
 acpi_cpu0: <CPU> on acpi0
 acpi_button0: <Power Button> on acpi0
 acpi_button1: <Sleep Button> on acpi0
 pcib0: <ACPI Host-PCI bridge> port 0x6000-0x607f,0x5000-0x500f,0x4080-0x40ff,0x4000-0x407f,0xcf8-0xcff on acpi0
 pci0: <ACPI PCI bus> on pcib0
 pcib0: slot 7 INTD is routed to irq 11
 pcib0: slot 7 INTD is routed to irq 11
 pcib0: slot 7 INTC is routed to irq 10
 agp0: <VIA 82C8363 (Apollo KT133A) host to PCI bridge> mem 0xd0000000-0xd3ffffff at device 0.0 on pci0
 pcib1: <PCI-PCI bridge> at device 1.0 on pci0
 pci1: <PCI bus> on pcib1
 pcib1: slot 0 INTA is routed to irq 16
 drm0: <Matrox G400/G450 (AGP)> mem 0xd7000000-0xd77fffff,0xd6000000-0xd6003fff,0xd4000000-0xd5ffffff irq 16 at device 0.0 on pci1
 info: [drm] AGP at 0xd0000000 64MB
 info: [drm] Initialized mga 3.1.0 20021029 on minor 0
 isab0: <PCI-ISA bridge> at device 7.0 on pci0
 isa0: <ISA bus> on isab0
 atapci0: <VIA 82C686B UDMA100 controller> port 0xc000-0xc00f at device 7.1 on pci0
 atapci0: Correcting VIA config for southbridge data corruption bug
 ata0: at 0x1f0 irq 14 on atapci0
 ata0: [MPSAFE]
 ata1: at 0x170 irq 15 on atapci0
 ata1: [MPSAFE]
 uhci0: <VIA 83C572 USB controller> port 0xc400-0xc41f irq 11 at device 7.2 on pci0
 usb0: <VIA 83C572 USB controller> on uhci0
 usb0: USB revision 1.0
 uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 2 ports with 2 removable, self powered
 ukbd0: Sun Microsystems Type 6 USB keyboard, rev 1.00/1.01, addr 2, iclass 3/1
 kbd0 at ukbd0
 uhub1: NEC Corporation USB2.0 Hub Controller, class 9/0, rev 2.00/1.00, addr 3
 uhub1: 4 ports with 4 removable, self powered
 ums0: Logitech Optical USB Mouse, rev 2.00/3.40, addr 4, iclass 3/1
 ums0: 3 buttons and Z dir.
 uhci1: <VIA 83C572 USB controller> port 0xc800-0xc81f irq 11 at device 7.3 on pci0
 usb1: <VIA 83C572 USB controller> on uhci1
 usb1: USB revision 1.0
 uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub2: 2 ports with 2 removable, self powered
 uhub2: port error, restarting port 2
 uhub2: port error, giving up port 2
 viapropm0: SMBus I/O base at 0x5000
 viapropm0: <VIA VT82C686A Power Management Unit> port 0x5000-0x500f at device 7.4 on pci0
 viapropm0: SMBus revision code 0x40
 smbus0: <System Management Bus> on viapropm0
 smb0: <SMBus generic I/O> on smbus0
 pci0: <multimedia, audio> at device 7.5 (no driver attached)
 bktr0: <BrookTree 848A> mem 0xd9000000-0xd9000fff irq 18 at device 9.0 on pci0
 bktr0: Pinnacle/Miro TV, Temic PAL tuner.
 rl0: <RealTek 8139 10/100BaseTX> port 0xdc00-0xdcff mem 0xd9001000-0xd90010ff irq 19 at device 10.0 on pci0
 rl0: Ethernet address: 00:30:84:78:bc:33
 miibus0: <MII bus> on rl0
 rlphy0: <RealTek internal media interface> on miibus0
 rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 rl1: <RealTek 8139 10/100BaseTX> port 0xe000-0xe0ff mem 0xd9002000-0xd90020ff irq 18 at device 13.0 on pci0
 rl1: Ethernet address: 00:e0:7d:95:51:a9
 miibus1: <MII bus> on rl1
 rlphy1: <RealTek internal media interface> on miibus1
 rlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
 fdc0: FIFO enabled, 8 bytes threshold
 fd0: <1440-KB 3.5" drive> on fdc0 drive 0
 sio0 port 0x3f8-0x3ff irq 4 on acpi0
 sio0: type 16550A
 sio1 port 0x2f8-0x2ff irq 3 on acpi0
 sio1: type 16550A
 ppc0 port 0x378-0x37f irq 7 on acpi0
 ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
 ppbus0: <Parallel port bus> on ppc0
 plip0: <PLIP network interface> on ppbus0
 lpt0: <Printer> on ppbus0
 lpt0: Interrupt-driven port
 ppi0: <Parallel I/O> on ppbus0
 orm0: <Option ROMs> at iomem 0xcc000-0xcffff,0xc0000-0xc87ff on isa0
 pmtimer0 on isa0
 atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 Timecounter "TSC" frequency 1660028065 Hz quality 800
 Timecounters tick every 10.000 msec
 GEOM: create disk ad0 dp=0xc48e4e60
 ad0: 43979MB <IBM-DTLA-307045> [89355/16/63] at ata0-master UDMA100
 acd0: DVDROM <TOSHIBA DVD-ROM SD-M1502> at ata1-master PIO4
 Mounting root from ufs:/dev/ad0s2a
 
 --IJpNTDwzlM2Ie8A6--
 
 --+pHx0qQiF2pBVqBT
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.4 (FreeBSD)
 
 iD8DBQFAL2gUFRuplBF1wuMRAnN1AJ9fhcQSicrXfsRbNaY4jgak76G2EACfT6Nb
 qKpxv0ZaFAICGzTMf5XRDlE=
 =pRB8
 -----END PGP SIGNATURE-----
 
 --+pHx0qQiF2pBVqBT--
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Thu Jun 10 08:37:52 GMT 2004 
State-Changed-Why:  

Hi, can you check if src/sys/dev/usb/uhub.c revision 1.55 helps? 

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

From: Ian Dowse <iedowse@maths.tcd.ie>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/59687: Broken USB with 5.x on ASUS A7V8X-X 
Date: Mon, 02 Aug 2004 18:01:31 +0100

 Adding to the audit trail:
 
 In message <1EA03238-CFC4-11D8-AEFD-000A956B6386@FreeBSD.org>, Ade Lovett write
 s:
 >On Jun 10, 2004, at 01:39, Ian Dowse wrote:
 >> Hi, can you check if src/sys/dev/usb/uhub.c revision 1.55 helps?
 >
 >Can't check with 5.x right now, since I needed this particular box back 
 >on 4.x for the major autotools cleanup I'm doing in /usr/ports right 
 >now (hence the late response too, my apologies)
 >
 >However, on 4.x, uhub.c rev 1.21.2.9 appears to have corrected the 
 >problem in 99.9% of the cases.  There seems to be an edge case where 
 >the previous behavior occurs, but I've only managed to reproduce it 
 >once, with some particularly knarly (and now destroyed) USB hardware 
 >attached to the machine.
 >
 >Certainly, I'm running a USB mouse and an HP Photosmart 1215 USB 
 >printer from this box right now, so I *think* it's fixed.
 >
 >Thanks,
 >	-aDe
 >
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Aug 2 17:16:58 GMT 2004 
State-Changed-Why:  

Revision 1.21.2.9 of uhub.c has mostly fixed this. 

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