NetBSD Problem Report #40056

From kilbi@kilbi.de  Fri Nov 28 16:25:36 2008
Return-Path: <kilbi@kilbi.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 2A53463B8BD
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Nov 2008 16:25:36 +0000 (UTC)
Message-Id: <20081128162157.466861049A@mail.kilbi.de>
Date: Fri, 28 Nov 2008 17:21:56 +0100 (MET)
From: mk@kilbi.de
Reply-To: mk@kilbi.de
To: gnats-bugs@gnats.NetBSD.org
Subject: ATI SB700/SB800 ehci problem with uhub's
X-Send-Pr-Version: 3.95

>Number:         40056
>Category:       kern
>Synopsis:       ATI SB700/SB800 USB ehci problem with an uhub
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 28 16:30:00 +0000 2008
>Closed-Date:    Wed Jul 06 22:32:00 +0000 2016
>Last-Modified:  Wed Jul 06 22:32:00 +0000 2016
>Originator:     Markus W Kilbinger
>Release:        NetBSD 5.99.3
>Organization:
>Environment:


System: NetBSD 5.99.3 (Q) #2: Fri Nov 28 15:50:14 MET 2008  root@qie:/u/NetBSD/HEAD/src/sys/arch/amd64/compile/Q amd64
Architecture: x86_64
Machine: amd64
>Description:
	Due to my chassis lack of front panel usb connectors I've
	built in a frontside usb hub and connected it to one of the
	maiboards (asus m3a78-t) usb connectors which seems to work
	properly for/with the bios and linux (e. g I can plug in usb
	mem sticks and boot/read/write from/to them).

	With netbsd-current (see above) the frontside usb hub (uhub7)
	seems to be detected correctly:

	  $ /sbin/dmesg | grep -E "(ohci|usb|uhub)" | grep -v fwohci
	  ohci0 at pci0 dev 18 function 0: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
	  ohci0: interrupting at ioapic0 pin 16
	  ohci0: OHCI version 1.0, legacy support
	  usb0 at ohci0: USB revision 1.0
	  ohci1 at pci0 dev 18 function 1: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
	  ohci1: interrupting at ioapic0 pin 16
	  ohci1: OHCI version 1.0, legacy support
	  usb1 at ohci1: USB revision 1.0
	  ehci0: companion controllers, 3 ports each: ohci0 ohci1
	  usb2 at ehci0: USB revision 2.0
	  ohci2 at pci0 dev 19 function 0: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
	  ohci2: interrupting at ioapic0 pin 18
	  ohci2: OHCI version 1.0, legacy support
	  usb3 at ohci2: USB revision 1.0
	  ohci3 at pci0 dev 19 function 1: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
	  ohci3: interrupting at ioapic0 pin 18
	  ohci3: OHCI version 1.0, legacy support
	  usb4 at ohci3: USB revision 1.0
	  ehci1: companion controllers, 3 ports each: ohci2 ohci3
	  usb5 at ehci1: USB revision 2.0
	  ohci4 at pci0 dev 20 function 5: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
	  ohci4: interrupting at ioapic0 pin 18
	  ohci4: OHCI version 1.0, legacy support
	  usb6 at ohci4: USB revision 1.0
	  uhub0 at usb0: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	  uhub0: 3 ports with 3 removable, self powered
	  uhub1 at usb1: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	  uhub1: 3 ports with 3 removable, self powered
	  uhub2 at usb2: ATI Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
	  uhub2: 6 ports with 6 removable, self powered
	  uhub3 at usb3: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	  uhub3: 3 ports with 3 removable, self powered
	  uhub4 at usb4: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	  uhub4: 3 ports with 3 removable, self powered
	  uhub5 at usb5: ATI Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
	  uhub5: 6 ports with 6 removable, self powered
	  uhub6 at usb6: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
	  uhub6: 2 ports with 2 removable, self powered
	  uhub7 at uhub5 port 1: Genesys Logic USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2
	  uhub7: single transaction translator
	  uhub7: 4 ports with 4 removable, self powered

	, but nothing happens if I plug in an usb mem stick!?

	If I boot with a plugged in usb mem stick it stays activated
	(lit led via bios) and the mem stick is detected (and usable)
	correctly by the netbsd kernel. Plugging it out does not show
	a detach message though the correspondig usb hub led turns
	off. Re-plugging it in still does not produce any kernel
	message and the mem stick is no longer usable (before a
	reboot).

	With userconf(4) 'disable ehci' the usb hub reacts as
	exspected: Plugging/unplugging with normal kernel messages und
	functionality (and only USB 1.x speed).

	The mainboards rear/direct usb connectors also seem to work
	properly with my usb mem sticks directly connected (w/ USB 2.0
	support/speed).

	With Linux (slackware 12.1) the frontside usb hub works
	flawlessly w/ usb 2.0 support.

	Attached to an additional usb 2.0 pci card the frontside usb
	hub also works properly with netbsd _and_ usb 2.0
	support/speed.

	So, it seems to be a netbsd problem related to the ehci hub
	handling of my mainboards ATI SB700/SB800 usb controllers.
>How-To-Repeat:
	Try to use usb devs on an usb hub attached to an ATI
	SB700/SB800 usb controller.
>Fix:
	Unknown.

>Release-Note:

>Audit-Trail:
From: Christoph Egger <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Sat, 29 Nov 2008 19:50:48 +0100

 Can you check if this commit has any effect ?

 -----------------------------------------------------------
 Module Name:	src
 Committed By:	jmorse
 Date:		Fri Nov 28 17:18:21 UTC 2008

 Modified Files:
 	src/sys/dev/usb: ehci.c ehcireg.h

 Log Message:
 Fixed high-speed isoc USB transfers, 64 bit capable host controllers
 have a different transfer descriptor to non-capable controllers.

 Added dma-sync of data buffer before scheduling transfers


 To generate a diff of this commit:
 cvs rdiff -r1.154 -r1.155 src/sys/dev/usb/ehci.c
 cvs rdiff -r1.28 -r1.29 src/sys/dev/usb/ehcireg.h

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

From: Markus W Kilbinger <mk@kilbi.de>
To: Christoph Egger <Christoph_Egger@gmx.de>
Cc: gnats-bugs@NetBSD.org,
    kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Sun, 30 Nov 2008 07:56:41 +0100

 >>>>> "Egger" == Christoph Egger <Christoph_Egger@gmx.de> writes:

     Egger> Can you check if this commit has any effect ?

     Egger> -----------------------------------------------------------
     Egger> Module Name: src Committed By: jmorse Date: Fri Nov 28
     Egger> 17:18:21 UTC 2008

     Egger> To generate a diff of this commit:
     Egger> cvs rdiff -r1.154 -r1.155 src/sys/dev/usb/ehci.c
     Egger> cvs rdiff -r1.28 -r1.29 src/sys/dev/usb/ehcireg.h

 Sadly no.

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org, mk@kilbi.de, netbsd-bugs@netbsd.org,
 gnats-admin@netbsd.org, kern-bug-people@netbsd.org
Cc: 
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 02 Dec 2008 10:10:16 +0100

 Can you provide some more information, please?

 The pci id and pci revisions of the smbus controller,
 BIOS vendor and version,
 Mainboard vendor and revision
 and a complete dmesg (not just a snippet).

 Also do any other USB 2.0 devices (e.g. USB flash and USB HDD)
 work well in ehci mode?

 Christoph

 -- 



From: Markus W Kilbinger <mk@kilbi.de>
To: "Christoph Egger" <Christoph_Egger@gmx.de>
Cc: gnats-bugs@NetBSD.org,
    netbsd-bugs@netbsd.org,
    gnats-admin@netbsd.org,
    kern-bug-people@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 2 Dec 2008 14:04:49 +0100

 --OJLApt6qRD
 Content-Type: text/plain; charset=us-ascii
 Content-Description: message body text
 Content-Transfer-Encoding: 7bit

 >>>>> "Christoph" == Christoph Egger <Christoph_Egger@gmx.de> writes:

     Christoph> Can you provide some more information, please?

     Christoph> The pci id and pci revisions of the smbus controller,
     Christoph> BIOS vendor and version, Mainboard vendor and revision
     Christoph> and a complete dmesg (not just a snippet).

 Complete dmesg output is attached at the end. Does it contain all your
 wanted infos?

     Christoph> Also do any other USB 2.0 devices (e.g. USB flash and
     Christoph> USB HDD) work well in ehci mode?

 All USB 2.0 devices I have (USB flash, hdd and a camera (ugen)) behave
 the same way at this additonal uhub7:

 - They work (once) in ehci mode if netbsd was booted with these
   devices already plugged in (BIOS puts them in led lit state, kernel
   detects them normally and they work as usual).

 - Every later plug-in/-out (under the running netbsd kernel) leads to
   a non working ehci state (with no further kernel message, non lit
   led).


 --OJLApt6qRD
 Content-Type: text/plain
 Content-Description: ASUS M3A78-T dmesg
 Content-Disposition: inline;
 	filename="asus-m3a78-t.dmesg"
 Content-Transfer-Encoding: 7bit

 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 5.99.4 (Q) #4: Tue Dec  2 13:24:45 MET 2008
 	root@qie:/u/NetBSD/HEAD/src/sys/arch/amd64/compile/Q
 total memory = 3583 MB
 avail memory = 3461 MB
 timecounter: Timecounters tick every 10.000 msec
 timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
 SMBIOS rev. 2.5 @ 0x9f400 (71 entries)
 System manufacturer System Product Name (System Version)
 mainbus0 (root)
 cpu0 at mainbus0 apid 0: AMD 686-class, 2506MHz, id 0x60fb2
 cpu1 at mainbus0 apid 1: AMD 686-class, 2506MHz, id 0x60fb2
 ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 21, 24 pins
 acpi0 at mainbus0: Intel ACPICA 20080321
 acpi0: X/RSDT: OemId <103008,OEMXSDT ,20081030>, AslId <MSFT,00000097>
 acpi0: SCI interrupting at int 9
 acpi0: fixed-feature power button present
 timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
 ACPI-Fast 32-bit timer
 PSKE (PNP0303) at acpi0 not configured
 PSMS (PNP0F03) at acpi0 not configured
 attimer1 at acpi0 (TMR, PNP0100): AT Timer
 attimer1: io 0x40-0x43 irq 0
 pcppi1 at acpi0 (SPKR, PNP0800)
 pcppi1: io 0x61
 midi0 at pcppi1: PC speaker (CPU-intensive output)
 sysbeep0 at pcppi1
 fdc1 at acpi0 (FDC, PNP0700)
 fdc1: io 0x3f0-0x3f5,0x3f7 irq 6 drq 2
 fdc1: expected BUFFER, got 4
 aiboost0 at acpi0 (ASOC, ATK0110-16843024)
 aiboost0: ASUS AI Boost Hardware monitor
 hpet0 at acpi0 (HPET, PNP0103)
 hpet0: mem 0xfed00000-0xfed003ff
 timecounter: Timecounter "hpet0" frequency 14318180 Hz quality 2000
 PS2K (PNP0303) at acpi0 not configured
 acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
 attimer1: attached to pcppi1
 pci0 at mainbus0 bus 0: configuration mode 1
 pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
 pchb0 at pci0 dev 0 function 0
 pchb0: Advanced Micro Devices product 0x9600 (rev. 0x00)
 ppb0 at pci0 dev 1 function 0: Asustek Computer product 0x9602 (rev. 0x00)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 vga0 at pci1 dev 5 function 0: ATI Technologies product 0x9614 (rev. 0x00)
 wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
 wsmux1: connecting to wsdisplay0
 drm at vga0 not configured
 ppb1 at pci0 dev 10 function 0: Advanced Micro Devices product 0x9609 (rev. 0x00)
 ppb1: unsupported PCI Express version
 pci2 at ppb1 bus 2
 pci2: i/o space, memory space enabled, rd/line, wr/inv ok
 mskc0 at pci2 dev 0 function 0mskc0: interrupt moderation is 0 us
 , Yukon-2 EC Ultra rev. B0 (0x3): ioapic0 pin 18
 msk0 at mskc0 port A: Ethernet address 00:22:15:xx:xx:xx
 ukphy0 at msk0 phy 0: Generic IEEE 802.3u media interface
 ukphy0: OUI 0x000ac2, model 0x000b, rev. 1
 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
 ahcisata0 at pci0 dev 17 function 0: ATI Technologies SB700/SB800 SATA Controller (AHCI mode)
 ahcisata0: interrupting at ioapic0 pin 22
 ahcisata0: AHCI revision 1.1, 6 ports, 32 command slots, features 0xf722e080
 atabus0 at ahcisata0 channel 0
 atabus1 at ahcisata0 channel 1
 atabus2 at ahcisata0 channel 2
 atabus3 at ahcisata0 channel 3
 atabus4 at ahcisata0 channel 4
 atabus5 at ahcisata0 channel 5
 ohci0 at pci0 dev 18 function 0: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
 ohci0: interrupting at ioapic0 pin 16
 ohci0: OHCI version 1.0, legacy support
 usb0 at ohci0: USB revision 1.0
 ohci1 at pci0 dev 18 function 1: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
 ohci1: interrupting at ioapic0 pin 16
 ohci1: OHCI version 1.0, legacy support
 usb1 at ohci1: USB revision 1.0
 ehci0 at pci0 dev 18 function 2: ATI Technologies SB700/SB800 USB EHCI Controller (rev. 0x00)
 ehci0: interrupting at ioapic0 pin 17
 ehci0: dropped intr workaround enabled
 ehci0: EHCI version 1.0
 ehci0: companion controllers, 3 ports each: ohci0 ohci1
 usb2 at ehci0: USB revision 2.0
 ohci2 at pci0 dev 19 function 0: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
 ohci2: interrupting at ioapic0 pin 18
 ohci2: OHCI version 1.0, legacy support
 usb3 at ohci2: USB revision 1.0
 ohci3 at pci0 dev 19 function 1: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
 ohci3: interrupting at ioapic0 pin 18
 ohci3: OHCI version 1.0, legacy support
 usb4 at ohci3: USB revision 1.0
 ehci1 at pci0 dev 19 function 2: ATI Technologies SB700/SB800 USB EHCI Controller (rev. 0x00)
 ehci1: interrupting at ioapic0 pin 19
 ehci1: dropped intr workaround enabled
 ehci1: EHCI version 1.0
 ehci1: companion controllers, 3 ports each: ohci2 ohci3
 usb5 at ehci1: USB revision 2.0
 piixpm0 at pci0 dev 20 function 0
 piixpm0: ATI Technologies SB600/SB700/SB800 SMBus Controller (rev. 0x3a)
 piixpm0: interrupting at SMIpiixpm0: polling
 iic0 at piixpm0: I2C bus
 spdmem0 at iic0 addr 0x50
 spdmem0: DDR2 SDRAM memory, no parity or ECC, 2048MB, 800MHz (PC2-6400)
 spdmem0: 14 rows, 10 cols, 2 ranks, 8 banks/chip, 2.50ns cycle time
 spdmem0: tAA-tRCD-tRP-tRAS: 5-5-5-15
 spdmem0: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
 spdmem1 at iic0 addr 0x51
 spdmem1: DDR2 SDRAM memory, no parity or ECC, 2048MB, 800MHz (PC2-6400)
 spdmem1: 14 rows, 10 cols, 2 ranks, 8 banks/chip, 2.50ns cycle time
 spdmem1: tAA-tRCD-tRP-tRAS: 5-5-5-15
 spdmem1: voltage SSTL 1.8V, refresh time 7.8us (self-refreshing)
 ixpide0 at pci0 dev 20 function 1
 ixpide0: ATI Technologies IXP IDE Controller (rev. 0x00)
 ixpide0: bus-master DMA support present
 ixpide0: primary channel configured to compatibility mode
 ixpide0: primary channel interrupting at ioapic0 pin 14
 atabus6 at ixpide0 channel 0
 ixpide0: secondary channel configured to compatibility mode
 ixpide0: secondary channel interrupting at ioapic0 pin 15
 atabus7 at ixpide0 channel 1
 azalia0 at pci0 dev 20 function 2: Generic High Definition Audio Controller
 azalia0: interrupting at ioapic0 pin 16
 azalia0: host: ATI Technologies SB600 Azalia (rev. 0), HDA rev. 1.0
 pcib0 at pci0 dev 20 function 3
 pcib0: ATI Technologies SB700/SB800 LPC Host Controller (rev. 0x00)
 ppb2 at pci0 dev 20 function 4: ATI Technologies SB600 PCI to PCI Bridge (rev. 0x00)
 pci3 at ppb2 bus 3
 pci3: i/o space, memory space enabled
 cbb0 at pci3 dev 5 function 0: ENE Technology CB1410 CardBus Controller (rev. 0x01)
 puc0 at pci3 dev 6 function 0: NetMos NM9835 Dual UART and 1284 Printer port (com, com, lpt)
 com2 at puc0 port 0: interrupting at ioapic0 pin 21
 com2: ns16550a, working fifo
 com3 at puc0 port 1: interrupting at ioapic0 pin 21
 com3: ns16550a, working fifo
 lpt0 at puc0 port 2: interrupting at ioapic0 pin 21
 fwohci0 at pci3 dev 8 function 0: Lucent Technologies FW322/323 IEEE 1394 Host Controller (rev. 0x70)
 fwohci0: interrupting at ioapic0 pin 22
 fwohci0: OHCI version 1.0 (ROM=1)
 fwohci0: No. of Isochronous channels is 8.
 fwohci0: EUI64 00:1e:8c:xx:xx:xx:xx:xx
 fwohci0: Phy 1394a available S400, 2 ports.
 fwohci0: Link S400, max_rec 2048 bytes.
 ieee1394if0 at fwohci0: IEEE1394 bus
 fwip0 at ieee1394if0: IP over IEEE1394
 fwohci0: Initiate bus reset
 cbb0: cacheline 0x10 lattimer 0x40
 cbb0: bhlc 0x24010
 cbb0: interrupting at ioapic0 pin 20
 cardslot0 at cbb0
 cardbus0 at cardslot0: bus 4
 pcmcia0 at cardslot0
 ohci4 at pci0 dev 20 function 5: ATI Technologies SB700/SB800 USB OHCI Controller (rev. 0x00)
 ohci4: interrupting at ioapic0 pin 18
 ohci4: OHCI version 1.0, legacy support
 usb6 at ohci4: USB revision 1.0
 pchb1 at pci0 dev 24 function 0
 pchb1: Advanced Micro Devices K8 AMD64 HyperTransport Configuration (rev. 0x00)
 pchb2 at pci0 dev 24 function 1
 pchb2: Advanced Micro Devices K8 AMD64 Address Map Configuration (rev. 0x00)
 pchb3 at pci0 dev 24 function 2
 pchb3: Advanced Micro Devices K8 AMD64 DRAM Configuration (rev. 0x00)
 amdtemp0 at pci0 dev 24 function 3
 amdtemp0: AMD CPU Temperature Sensors (K8: core rev BH-G2)
 isa0 at pcib0
 pckbc0 at isa0 port 0x60-0x64
 pckbd0 at pckbc0 (kbd slot)
 pckbc0: using irq 1 for kbd slot
 wskbd0 at pckbd0: console keyboard, using wsdisplay0
 fwohci0: BUS reset
 fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
 ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
 ieee1394if0: bus manager 0 (me)
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 azalia0: codec[0]: Realtek ALC888 (rev. 1.1), HDA rev. 1.0
 audio0 at azalia0: full duplex, independent
 uhub0 at usb0: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub0: 3 ports with 3 removable, self powered
 uhub1 at usb1: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub1: 3 ports with 3 removable, self powered
 uhub2 at usb2: ATI Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub2: 6 ports with 6 removable, self powered
 uhub3 at usb3: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub3: 3 ports with 3 removable, self powered
 uhub4 at usb4: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub4: 3 ports with 3 removable, self powered
 uhub5 at usb5: ATI Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 uhub5: 6 ports with 6 removable, self powered
 uhub6 at usb6: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 uhub6: 2 ports with 2 removable, self powered
 IPsec: Initialized Security Association Processing.
 sysctl_createv: sysctl_create(kern) returned 1
 sysctl_createv: sysctl_locate(boottime) returned 2
 sysctl_createv: sysctl_create(vm) returned 1
 sysctl_createv: sysctl_locate(loadavg) returned 2
 sysctl_createv: sysctl_create(hw) returned 1
 sysctl_createv: sysctl_locate(machine) returned 2
 sysctl_createv: sysctl_locate(machine_arch) returned 2
 ahcisata0 port 0: device present, speed: 3.0Gb/s
 ahcisata0 port 2: device present, speed: 1.5Gb/s
 wd0 at atabus0 drive 0: <SAMSUNG HD753LJ>
 wd0: drive supports 16-sector PIO transfers, LBA48 addressing
 wd0: 698 GB, 1453521 cyl, 16 head, 63 sec, 512 bytes/sect x 1465149168 sectors
 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
 wd0(ahcisata0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
 atapibus0 at atabus2: 1 targets
 cd0 at atapibus0 drive 0: <ATAPI   DVD D  DH16D2S, , EP53> cdrom removable
 cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
 cd0(ahcisata0:2:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
 atapibus1 at atabus6: 2 targets
 cd1 at atapibus1 drive 0: <_NEC DVD_RW ND-2510A, , 2.18> cdrom removable
 cd1: 32-bit data port
 cd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
 cd1(ixpide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
 uhub7 at uhub5 port 1: Genesys Logic USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2
 uhub7: single transaction translator
 uhub7: 4 ports with 4 removable, self powered
 uhidev0 at uhub1 port 3 configuration 1 interface 0
 uhidev0: Logitech USB-PS/2 Mouse, rev 1.00/1.20, addr 2, iclass 3/1
 ums0 at uhidev0: 3 buttons
 wsmouse0 at ums0 mux 0
 fd0 at fdc1 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
 Kernelized RAIDframe activated
 pad0: outputs: 44100Hz, 16-bit, stereo
 audio1 at pad0: half duplex
 boot device: wd0
 root on wd0a dumps on wd0b
 root file system type: ffs
 mskc0: interrupt moderation is 1000 us
 wsdisplay0: screen 1 added (80x25, vt100 emulation)
 wsdisplay0: screen 2 added (80x25, vt100 emulation)
 wsdisplay0: screen 3 added (80x25, vt100 emulation)
 wsdisplay0: screen 4 added (80x25, vt100 emulation)

 --OJLApt6qRD--

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: mk@kilbi.de
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
 gnats-bugs@NetBSD.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 02 Dec 2008 14:38:55 +0100

 > >>>>> "Christoph" == Christoph Egger <Christoph_Egger@gmx.de> writes:
 > 
 >     Christoph> Can you provide some more information, please?
 > 
 >     Christoph> The pci id and pci revisions of the smbus controller,
 >     Christoph> BIOS vendor and version, Mainboard vendor and revision
 >     Christoph> and a complete dmesg (not just a snippet).
 > 
 > Complete dmesg output is attached at the end. Does it contain all your
 > wanted infos?

 Almost. BIOS and mainboard information are missing.

 Christoph

From: Markus W Kilbinger <mk@kilbi.de>
To: "Christoph Egger" <Christoph_Egger@gmx.de>
Cc: kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org,
    gnats-bugs@NetBSD.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 2 Dec 2008 15:14:04 +0100

 >>>>> "Christoph" == Christoph Egger <Christoph_Egger@gmx.de> writes:

     >> Complete dmesg output is attached at the end. Does it contain
     >> all your wanted infos?

     Christoph> Almost. BIOS and mainboard information are missing.

 Ok:

 - Mainboard is a ASUS M3A78-T

 - BIOS v0502

 See

   http://de.asus.com/search.aspx?searchitem=1&searchkey=m3a78-t

 Markus.

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 2 Dec 2008 21:47:35 +0100

 On Fri, Nov 28, 2008 at 04:30:01PM +0000, mk@kilbi.de wrote:

 [..]

 > 	  uhub5 at usb5: ATI Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
 > 	  uhub5: 6 ports with 6 removable, self powered
 > 	  uhub6 at usb6: ATI Technologie OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
 > 	  uhub6: 2 ports with 2 removable, self powered
 > 	  uhub7 at uhub5 port 1: Genesys Logic USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2
 > 	  uhub7: single transaction translator
 > 	  uhub7: 4 ports with 4 removable, self powered

 Using the same mb and bios with different usb sticks and a hub too:

 1.) a sd card reader in a floppy drive:

 umass0 at uhub5 port 2 configuration 1 interface 0
 umass0: Ltd Winter Ver1.3, rev 2.00/0.05, addr 2
 umass0: using SCSI over Bulk-Only
 scsibus0 at umass0: 2 targets, 2 luns per target
 sd0 at scsibus0 target 0 lun 0: <USB2.0, CardReader CF RW, 0814> disk removable
 sd0: drive offline
 sd1 at scsibus0 target 0 lun 1: <USB2.0, CardReader Combo, 0814> disk removable
 sd1: drive offline

 I insert a sd card after booting and can access it with disklabel and mount it.

 2.) Now a usb stick on the usb connector at the front side of the case:

 umass1 at uhub5 port 5 configuration 1 interface 0
 umass1: TwinMOS U3 MobileDisk, rev 2.00/2.00, addr 3
 umass1: using SCSI over Bulk-Only
 scsibus1 at umass1: 2 targets, 2 luns per target
 sd2 at scsibus1 target 0 lun 0: <TwinMOS, U3 MobileDisk, 6.16> disk removable
 sd2: 1954 MB, 1009 cyl, 128 head, 31 sec, 512 bytes/sect x 4003711 sectors
 cd1 at scsibus1 target 0 lun 1: <TwinMOS, U3 MobileDisk, 6.16> cdrom removable

 Works fine too.

 3.) The same stick, but using a usb hub:

 uhub7 at uhub4 port 3: Atmel Standard USB Hub, class 9/0, rev 1.10/3.00, addr 2
 uhub7: 4 ports with 4 removable, self powered
 umass1 at uhub7 port 1 configuration 1 interface 0
 umass1: TwinMOS U3 MobileDisk, rev 2.00/2.00, addr 3
 umass1: using SCSI over Bulk-Only
 scsibus1 at umass1: 2 targets, 2 luns per target
 sd2 at scsibus1 target 0 lun 0: <TwinMOS, U3 MobileDisk, 6.16> disk removable
 sd2: 1954 MB, 1009 cyl, 128 head, 31 sec, 512 bytes/sect x 4003711 sectors
 cd1 at scsibus1 target 0 lun 1: <TwinMOS, U3 MobileDisk, 6.16> cdrom removable

 Which works fine too.

 => No problem here with 5.99.02, but it also worked fine with 4.99.73

 > >How-To-Repeat:
 > 	Try to use usb devs on an usb hub attached to an ATI
 > 	SB700/SB800 usb controller.

 Btw, it is a SB750 which you and I have.

 Bernd

From: Markus W Kilbinger <mk@kilbi.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Tue, 2 Dec 2008 22:59:44 +0100

 My config:

   uhub7 at uhub5 port 1: Genesys Logic USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2
   uhub7: single transaction translator
   uhub7: 4 ports with 4 removable, self powered

 Bernd's:

  3.) The same stick, but using a usb hub:

  uhub7 at uhub4 port 3: Atmel Standard USB Hub, class 9/0, rev 1.10/3.00, addr 2
  uhub7: 4 ports with 4 removable, self powered

  Which works fine too.

  => No problem here with 5.99.02, but it also worked fine with 4.99.73

 -> Is 'uhub7: single transaction translator' the problem?

From: Markus W Kilbinger <mk@kilbi.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Wed, 3 Dec 2008 12:32:49 +0100

 BTW:

 Bernd>  3.) The same stick, but using a usb hub:
 Bernd>  
 Bernd>  uhub7 at uhub4 port 3: Atmel Standard USB Hub, class 9/0, rev 1.10/3.00, addr 2
 Bernd>  uhub7: 4 ports with 4 removable, self powered
 Bernd>  umass1 at uhub7 port 1 configuration 1 interface 0
 Bernd>  umass1: TwinMOS U3 MobileDisk, rev 2.00/2.00, addr 3
 Bernd>  umass1: using SCSI over Bulk-Only
 Bernd>  scsibus1 at umass1: 2 targets, 2 luns per target
 Bernd>  sd2 at scsibus1 target 0 lun 0: <TwinMOS, U3 MobileDisk, 6.16> disk removable
 Bernd>  sd2: 1954 MB, 1009 cyl, 128 head, 31 sec, 512 bytes/sect x 4003711 sectors
 Bernd>  cd1 at scsibus1 target 0 lun 1: <TwinMOS, U3 MobileDisk, 6.16> cdrom removable
 Bernd>  
 Bernd>  Which works fine too.
 Bernd>  
 Bernd>  => No problem here with 5.99.02, but it also worked fine with 4.99.73

 Reading src/sys/dev/usb/uhub.c (line 150ff):

         if (dev->depth > 0 && UHUB_IS_HIGH_SPEED(sc)) {
                 aprint_normal_dev(self, "%s transaction translator%s\n",
                        UHUB_IS_SINGLE_TT(sc) ? "single" : "multiple",
                        UHUB_IS_SINGLE_TT(sc) ? "" : "s");
         }

 If you really do _not_ see the '... transaction translator.' message
 your additional usb hub seems _not_ to communicate in ehci mode,
 right?

 Without ehci it works for me, too. ;-)

 It could be a usb hub specific problem, though.
 I'll try to produce some debug output tonight.

 Markus.

From: "Christoph Egger" <Christoph_Egger@gmx.de>
To: mk@kilbi.de
Cc: gnats-bugs@NetBSD.org, netbsd-bugs@netbsd.org, gnats-admin@netbsd.org,
 kern-bug-people@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Thu, 04 Dec 2008 11:44:39 +0100

 Please see
 http://mail-index.netbsd.org/tech-kern/2008/12/04/msg003734.html

 Christoph

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Sun, 21 Dec 2008 14:33:51 +0100

 On Tue, Dec 02, 2008 at 08:50:05PM +0000, Bernd Ernesti wrote:
 [..]
 >  => No problem here with 5.99.02, but it also worked fine with 4.99.73

 As Markus pointed out, I only used a non ehci hub.

 I bought a usb 2 hub and it fails too now.

 Bernd

From: Christoph Egger <Christoph_Egger@gmx.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Fri, 12 Jun 2009 14:41:53 +0200

 --Boundary-00=_R0kMKOym0Fvy6fb
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline


 Please try attached patch!


 --Boundary-00=_R0kMKOym0Fvy6fb
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="amdsb700.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="amdsb700.diff"

 Index: ehci_pci.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/pci/ehci_pci.c,v
 retrieving revision 1.44
 diff -u -p -r1.44 ehci_pci.c
 --- ehci_pci.c	26 Apr 2009 09:47:31 -0000	1.44
 +++ ehci_pci.c	12 Jun 2009 12:39:01 -0000
 @@ -60,6 +60,18 @@ extern int ehcidebug;
  #define DPRINTF(x)
  #endif

 +enum ehci_pci_quirk_flags {
 +	EHCI_PCI_QUIRK_AMD_SB600 = 0x1,	/* always need a quirk */
 +	EHCI_PCI_QUIRK_AMD_SB700 = 0x2,	/* depends on the SMB revision */
 +};
 +
 +static const struct pci_quirkdata ehci_pci_quirks[] = {
 +	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB600_USB_EHCI,
 +	    EHCI_PCI_QUIRK_AMD_SB600 },
 +	{ PCI_VENDOR_ATI, PCI_PRODUCT_ATI_SB700_USB_EHCI,
 +	    EHCI_PCI_QUIRK_AMD_SB700 },
 +};
 +
  static void ehci_release_ownership(ehci_softc_t *sc, pci_chipset_tag_t pc,
  				   pcitag_t tag);
  static void ehci_get_ownership(ehci_softc_t *sc, pci_chipset_tag_t pc,
 @@ -74,7 +86,15 @@ struct ehci_pci_softc {
  	void 			*sc_ih;		/* interrupt vectoring */
  };

 +static int ehci_sb700_match(struct pci_attach_args *pa);
 +static int ehci_apply_amd_quirks(struct ehci_pci_softc *sc);
 +enum ehci_pci_quirk_flags ehci_pci_lookup_quirkdata(pci_vendor_id_t,
 +	pci_product_id_t);
 +
  #define EHCI_MAX_BIOS_WAIT		1000 /* ms */
 +#define EHCI_SBx00_WORKAROUND_REG	0x50
 +#define EHCI_SBx00_WORKAROUND_ENABLE	__BIT(27)
 +

  static int
  ehci_pci_match(device_t parent, cfdata_t match, void *aux)
 @@ -104,6 +124,7 @@ ehci_pci_attach(device_t parent, device_
  	usbd_status r;
  	int ncomp;
  	struct usb_pci *up;
 +	int quirk;

  	sc->sc.sc_dev = self;
  	sc->sc.sc_bus.hci_private = sc;
 @@ -114,6 +135,10 @@ ehci_pci_attach(device_t parent, device_
  	aprint_normal(": %s (rev. 0x%02x)\n", devinfo,
  	    PCI_REVISION(pa->pa_class));

 +	/* Check for quirks */
 +	quirk = ehci_pci_lookup_quirkdata(PCI_VENDOR(pa->pa_id),
 +					   PCI_PRODUCT(pa->pa_id));
 +
  	/* Map I/O registers */
  	if (pci_mapreg_map(pa, PCI_CBMEM, PCI_MAPREG_TYPE_MEM, 0,
  			   &sc->sc.iot, &sc->sc.ioh, NULL, &sc->sc.sc_size)) {
 @@ -131,6 +156,17 @@ ehci_pci_attach(device_t parent, device_
  	sc->sc_tag = tag;
  	sc->sc.sc_bus.dmatag = pa->pa_dmat;

 +	/* Handle quirks */
 +	switch (quirk) {
 +	case EHCI_PCI_QUIRK_AMD_SB600:
 +		ehci_apply_amd_quirks(sc);
 +		break;
 +	case EHCI_PCI_QUIRK_AMD_SB700:
 +		if (pci_find_device(NULL, ehci_sb700_match))
 +			ehci_apply_amd_quirks(sc);
 +		break;
 +	}
 +
  	/* Enable the device. */
  	csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
  	pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,
 @@ -403,3 +439,47 @@ ehci_pci_resume(device_t dv PMF_FN_ARGS)
  	ehci_get_ownership(&sc->sc, sc->sc_pc, sc->sc_tag);
  	return ehci_resume(dv PMF_FN_CALL);
  }
 +
 +static int
 +ehci_sb700_match(struct pci_attach_args *pa)
 +{
 +	if (!(PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ATI &&
 +	    PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ATI_SB600_SMB))
 +		return 0;
 +
 +	switch (PCI_REVISION(pa->pa_class)) {
 +	case 0x3a:
 +	case 0x3b:
 +		return 1;
 +	}
 +
 +	return 0;
 +}
 +
 +static int
 +ehci_apply_amd_quirks(struct ehci_pci_softc *sc)
 +{
 +	pcireg_t value;
 + 
 +	aprint_normal_dev(sc->sc.sc_dev,
 +	    "applying AMD SB600/SB700 USB freeze workaround\n");
 +	value = pci_conf_read(sc->sc_pc, sc->sc_tag, EHCI_SBx00_WORKAROUND_REG);
 +	pci_conf_write(sc->sc_pc, sc->sc_tag, EHCI_SBx00_WORKAROUND_REG,
 +	    value | EHCI_SBx00_WORKAROUND_ENABLE);
 +
 +	return 0;
 +}
 +
 +enum ehci_pci_quirk_flags
 +ehci_pci_lookup_quirkdata(pci_vendor_id_t vendor, pci_product_id_t product)
 +{
 +	int i;
 +
 +	for (i = 0; i < __arraycount(ehci_pci_quirks); i++) {
 +		if (vendor == ehci_pci_quirks[i].vendor &&
 +		    product == ehci_pci_quirks[i].product)
 +			return ehci_pci_quirks[i].quirks;
 +	}
 +	return 0;
 +}
 +

 --Boundary-00=_R0kMKOym0Fvy6fb--

From: Markus W Kilbinger <mk@kilbi.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org,
    mk@kilbi.de
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Fri, 12 Jun 2009 23:18:29 +0200

 >>>>> "Christoph" == Christoph Egger <Christoph_Egger@gmx.de> writes:

     Christoph>  Please try attached patch!


     Christoph>  Index: ehci_pci.c
     Christoph>  ===================================================================
     Christoph>  RCS file: /cvsroot/src/sys/dev/pci/ehci_pci.c,v
     Christoph>  retrieving revision 1.44 diff -u -p -r1.44 ehci_pci.c
     Christoph>  --- ehci_pci.c 26 Apr 2009 09:47:31 -0000 1.44
     Christoph>  +++ ehci_pci.c 12 Jun 2009 12:39:01 -0000

 I did: 

 Patch applied and compiled flawlessly, the resulting kernel seems to
 correctly use your quirk:

   ehci0 at pci0 dev 18 function 2: ATI Technologies SB700/SB800 USB EHCI Controller (rev. 0x00)
   ehci0: applying AMD SB600/SB700 USB freeze workaround
   ehci0: interrupting at ioapic0 pin 17
   ehci0: dropped intr workaround enabled
   ehci0: EHCI version 1.0
   ehci0: companion controllers, 3 ports each: ohci0 ohci1
   [...]
   ehci1 at pci0 dev 19 function 2: ATI Technologies SB700/SB800 USB EHCI Controller (rev. 0x00)
   ehci1: applying AMD SB600/SB700 USB freeze workaround
   ehci1: interrupting at ioapic0 pin 19
   ehci1: dropped intr workaround enabled
   ehci1: EHCI version 1.0
   ehci1: companion controllers, 3 ports each: ohci2 ohci3

 , but shows no effect concerning my mentioned problem in my PR:
 (Un)plugging usb devices in/out of my usb hub still shows no kernel
 reaction/message!

 Anything else I can test/provide?

 Markus.

From: Christoph Egger <Christoph_Egger@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org, mk@kilbi.de
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Sat, 13 Jun 2009 08:14:51 +0200

 Markus W Kilbinger wrote:
 >  Anything else I can test/provide?

 Does it fix re-plugging problems with the uhub itself ?

 Christoph

From: Markus W Kilbinger <mk@kilbi.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org,
    gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: Re: kern/40056: ATI SB700/SB800 ehci problem with uhub's
Date: Mon, 15 Jun 2009 16:59:12 +0200

 >>>>> "Christoph" == Christoph Egger <Christoph_Egger@gmx.de> writes:

     Christoph>  Does it fix re-plugging problems with the uhub itself?

 Indeed, that works now. It even implies (re)connecting usb devices
 attached to that hub to the netbsd kernel.

 But that's not a practical solution for my reported problem because in
 my case that hub represents the frontpanel usb ports of my pc and its
 connectivity to the mainboard is (normaly) hidden inside the chassis.

 Thanks, though!

 Markus.

Responsible-Changed-From-To: kern-bug-people->skrll
Responsible-Changed-By: skrll@NetBSD.org
Responsible-Changed-When: Sun, 08 Mar 2015 11:37:39 +0000
Responsible-Changed-Why:
Take


State-Changed-From-To: open->feedback
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Sat, 23 Apr 2016 13:02:42 +0000
State-Changed-Why:
Does this appear in 7.99.28 (nick-nhusb merged)?


From: Markus W Kilbinger <mk@kilbi.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40056
Date: Wed, 6 Jul 2016 22:25:59 +0200

     NetBSD> kern/40056 - serious high priority sw-bug
     NetBSD> 	ATI SB700/SB800 USB ehci problem with an uhub
     NetBSD> 	http://gnats.NetBSD.org/cgi-bin/query-pr-single.pl?number=40056

 The PR can be closed.

 Though my original mainboard died in the meantime the successor board
 (asus sabertooth 990fx R2.0) with the same / a similar USB chip showed
 initially the same uhub problem, which was solved by the mentioned USB
 branch merge.

 Thanks, Markus.

State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 06 Jul 2016 22:32:00 +0000
State-Changed-Why:
Submitter confirmed fixed. party time!


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.