From ap@eNTity.bnc.net  Thu Sep 14 13:47:57 2000
Return-Path: <ap@eNTity.bnc.net>
Received: from gemini.bnc.net (gemini.bnc.net [62.225.99.33])
	by hub.freebsd.org (Postfix) with ESMTP id 28C7937B423
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Sep 2000 13:47:54 -0700 (PDT)
Received: from eNTity.bnc.net (entity.bnc.net [62.225.99.29])
          by gemini.bnc.net (8.9.3/8.9.3) with ESMTP id WAA92980
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Sep 2000 22:47:39 +0200 (CEST)
          (envelope-from ap@eNTity.bnc.net)
Received: (from ap@localhost)
	by eNTity.bnc.net (8.11.0/8.9.3) id e8BBf7V01163;
	Mon, 11 Sep 2000 13:41:07 +0200 (CEST)
	(envelope-from ap)
Message-Id: <200009111141.e8BBf7V01163@eNTity.bnc.net>
Date: Mon, 11 Sep 2000 13:41:07 +0200 (CEST)
From: Achim Patzner <ap@eNTity.bnc.net>
Reply-To: ap@eNTity.bnc.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: USB driver problem
X-Send-Pr-Version: 3.2

>Number:         21272
>Category:       kern
>Synopsis:       USB interrupts seem to be turned off
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    andre
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 14 13:50:00 PDT 2000
>Closed-Date:    Sat Dec 27 06:37:44 PST 2003
>Last-Modified:  Sat Dec 27 06:40:07 PST 2003
>Originator:     Achim Patzner
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:

	 
FreeBSD eNTity.bnc.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Sep 11
02:21:50 CEST 2000 root@eNTity.bnc.net:/space/src-CURRENT/sys/compile/ENTITY
i386
-CURRENT sources of about 1:00 CEST

Kernel configuration:
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.272 2000/08/24 18:56:54 peter Exp $

machine		i386
cpu		I686_CPU
ident		ENTITY
maxusers	32

#To statically compile in device wiring instead of /boot/device.hints
#hints		"GENERIC.hints"		#Default places to look for devices.

#makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols

options 	INET			#InterNETworking
options 	INET6			#IPv6 communications protocols
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	SOFTUPDATES		#Enable FFS soft updates support
options 	NFS			#Network Filesystem
options 	NFS_ROOT		#NFS usable as root device, NFS required
options 	CD9660			#ISO 9660 Filesystem
options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
options 	UCONSOLE		#Allow users to grab the console
options 	USERCONFIG		#boot -c editor
options 	VISUAL_USERCONFIG	#visual boot -c editor
options 	DDB
options 	DDB_UNATTENDED
options 	GDB_REMOTE_CHAT
options 	KTRACE			#ktrace(1) support
options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores
options 	P1003_1B		#Posix P1003_1B real-time extensions
options 	_KPOSIX_PRIORITY_SCHEDULING
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	RANDOMDEV		#entropy device

device		isa
device		pci
options 	COMPAT_OLDISA		# compatability shims for lnc, fe, le
options 	COMPAT_OLDPCI		# compatability shims for lnc, vx

# Floppy drives
device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk			# ATA disk drives
device		atapicd			# ATAPI CDROM drives
device		atapifd			# ATAPI floppy drives
device		atapist			# ATAPI tape drives
options 	ATA_ENABLE_ATAPI_DMA	#Enable DMA on ATAPI devices

# SCSI Controllers
device		ahc		# AHA2940 and onboard AIC7xxx devices
device		sym		# NCR/Symbios Logic (newer chipsets + those of `ncr')

# SCSI peripherals
device		scbus		# SCSI bus (required)
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc	1
device		atkbd
device		psm

device		vga

options 	ATKBD_DFLT_KEYMAP	# specify the built-in keymap
makeoptions	ATKBD_DFLT_KEYMAP="german.iso"

# splash screen/screen saver
device		splash

# syscons is the default console driver, resembling an SCO console
device		sc	1

options		VESA

device		pcm
device		pca

# Floating point support - do not disable.
device		npx

# Power management support (see NOTES for more options)
device		apm

# PCCARD (PCMCIA) support
device		card
device		pcic

# Serial (COM) ports
device		sio

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		plip		# TCP/IP over parallel
device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da


# PCI Ethernet NICs.
device		de		# DEC/Intel DC21x4x (``Tulip'')
device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)

# PCI Ethernet NICs that use the common MII bus controller code.
device		miibus		# MII bus support
device		dc		# DEC/Intel 21143 and various workalikes
device		rl		# RealTek 8129/8139
device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')

# ISA Ethernet NICs.
device		ed
device		lnc

# Pseudo devices - the number indicates how many units to allocated.
device		loop		# Network loopback
device		ether		# Ethernet support
device		sl		# Kernel SLIP
device		ppp	1	# Kernel PPP
device		tun		# Packet tunnel.
device		pty		# Pseudo-ttys (telnet etc)
device		md		# Memory "disks"
device		snp
device		gif	4	# IPv6 and IPv4 tunneling
device		faith	1	# IPv6-to-IPv4 relaying (translation)

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
device		bpf		# Berkeley packet filter

# USB support
device		uhci		# UHCI PCI->USB interface
device		ohci		# OHCI PCI->USB interface
device		usb		# USB Bus (required)
device		udbp		# USB Double Bulk Pipe devices
device		ugen		# Generic
device		uhid		# "Human Interface Devices"
device		ukbd		# Keyboard
device		ulpt		# Printer
device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse
device		urio		# Diamond Rio 500 MP3 player
#device		usio
# USB Ethernet, requires mii
device		aue		# ADMtek USB ethernet
device		cue		# CATC USB ethernet
device		kue		# Kawasaki LSI USB ethernet

device		umodem
#options		UMODEM_DEBUG

device		acpi

options		NETGRAPH

Kernel messages on boot:

Copyright (c) 1992-2000 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.0-CURRENT #0: Mon Sep 11 02:21:50 CEST 2000
    root@eNTity.bnc.net:/space/src-CURRENT/sys/compile/ENTITY
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium III/Pentium III Xeon/Celeron (501.14-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x681  Stepping = 1
  Features=0x387f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,PN,MMX,FXSR,XMM>
real memory  = 201261056 (196544K bytes)
avail memory = 189333504 (184896K bytes)
ACPI: Bad ACPI BIOS data checksum
Preloaded elf kernel "kernel" at 0xc0647000.
Pentium Pro MTRR support enabled
md0: Malloc disk
apm0: <APM BIOS> on motherboard
apm0: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pci0: <Intel 82443BX (440 BX) host to PCI bridge> at 0.0
pcib1: <Intel 82443BX (440 BX) PCI-PCI (AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
isab0: <Intel 82371AB PCI to ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 ATA33 controller> port 0x1100-0x110f at device 7.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xf300-0xf31f irq 10 at device 7.2 on pci0
usb0: <Intel 82371AB/EB (PIIX4) 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
aue0: Admtek Inc. USB to 10/100TX       , rev 1.10/1.01, addr 2
aue0: Ethernet address: 00:48:54:20:0e:fc
miibus0: <MII bus> on aue0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ugen0: STMicroelectronics USB Communicator, rev 1.00/2.00, addr 3
pci0: <Intel 82371AB Power management controller> at 7.3
pcic-pci0: <TI PCI-1225 PCI-CardBus Bridge> at device 10.0 on pci0
pcic-pci0: TI12XX PCI Config Reg: [ring enable][speaker enable][pwr save][FUNC pci int + CSC serial isa irq]
pcic-pci1: <TI PCI-1225 PCI-CardBus Bridge> at device 10.1 on pci0
pcic-pci1: TI12XX PCI Config Reg: [ring enable][speaker enable][pwr save][FUNC pci int + CSC serial isa irq]
pci0: <unknown card> (vendor=0x104c, dev=0x8009) at 13.0 irq 0
pci0: <ESS Technology Maestro 2E Audio controller> at 16.0 irq 11
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model GlidePoint, device ID 0
fdc0: direction bit not set
fdc0: cmd 3 failed at out byte 1 of 3
pca0 at port 0x40 on isa0
pcic0: <VLSI 82C146> at port 0x3e0 iomem 0xd0000 on isa0
pcic0: Polling mode
pccard0: <PC Card bus -- kludge version> on pcic0
pccard1: <PC Card bus -- kludge version> on pcic0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/15 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
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: configured irq 3 not in bitmap of probed irqs 0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
unknown: <PNP0303> can't assign resources
pca1: <AT-style speaker sound> at port 0x61 on isa0
unknown: <PNP0f13> can't assign resources
unknown: <PNP0501> can't assign resources
unknown: <PNP0401> can't assign resources
unknown: <SMCf010> can't assign resources
Profiling kernel, textsize=1918640 [c0123040..c02f76f0]
ad0: 19077MB <HITACHI_DK23BA-20> [38760/16/63] at ata0-master using UDMA33
ad1: 9590MB <IBM-DCXA-210000> [19485/16/63] at ata1-slave using UDMA33
acd0: CDROM <MATSHITA CR-173> at ata1-master using PIO3
Mounting root from ufs:/dev/ad0s1a



>Description:

	
[I don't know if this is a bug or a misconfiguration of my kernel.]

It seems that something is not reacting to USB interrupts as it should be.
I've connected an
aue0: Admtek Inc. USB to 10/100TX       , rev 1.10/1.01, addr 2
to my USB but performance is more than bad. A traceroute to www.freebsd.org
shows what's wrong:

 1  195.247.233.30  1008.999 ms  1009.665 ms  1010.775 ms
 2  62.225.99.249  1009.747 ms  1009.732 ms  1009.783 ms
 3  62.225.99.254  1009.746 ms  1009.764 ms  1009.209 ms
 4  62.225.99.242  1009.706 ms  1009.743 ms  1009.841 ms <--- End of LAN
 5  212.184.248.1  1009.650 ms  1010.789 ms  1009.726 ms
 6  212.185.10.33  1009.697 ms  1009.572 ms  1009.699 ms
 7  62.156.131.173  1010.711 ms  1009.759 ms  1009.780 ms
 8  194.25.121.101  1009.745 ms  1009.761 ms  1009.767 ms
 9  62.156.128.117  1010.910 ms  1009.468 ms  1009.762 ms
10  64.39.32.51  1009.835 ms  1009.463 ms  1010.755 ms
11  216.32.132.125  1009.752 ms  1009.767 ms  1009.792 ms
12  209.67.45.126  1009.730 ms  1009.758 ms  1010.654 ms
13  216.32.132.109  2019.573 ms  1009.751 ms  1008.205 ms
14  216.34.183.66  1010.742 ms  1009.714 ms  1009.763 ms
15  216.32.132.150  1009.591 ms  1009.761 ms  1009.788 ms
16  209.1.169.142  1010.759 ms  1009.680 ms  1009.788 ms
17  64.56.192.4  1009.753 ms  1009.766 ms  1010.780 ms
18  64.56.192.51  1009.765 ms  1009.778 ms  1009.783 ms
19  64.56.207.150  1009.665 ms  1010.769 ms  1009.782 ms
20  216.136.204.21  1009.760 ms  1009.779 ms  1009.774 ms

It seems to me that the device is polled once a second instead of generating
interrupts.

>How-To-Repeat:

	
see description.

>Fix:
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Sat Sep 16 05:06:06 PDT 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21272 
Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sun Sep 17 12:14:24 PDT 2000 
Responsible-Changed-Why:  
Nick, our USB guru will know if this is a generic 
USB problem or not. 
If not please assign the PR to wpaul who is the aue maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21272 
Responsible-Changed-From-To: n_hibma->wpaul 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Wed Sep 20 11:04:49 PDT 2000 
Responsible-Changed-Why:  
UHCI controllers don't do polling. I have the feeling that this must be a watchdog timeout. 
. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21272 
State-Changed-From-To: open->feedback 
State-Changed-By: andre 
State-Changed-When: Sat Dec 27 06:28:58 PST 2003 
State-Changed-Why:  
Idle for far too long.  Asking Originator if problem persits. 


Responsible-Changed-From-To: wpaul->andre 
Responsible-Changed-By: andre 
Responsible-Changed-When: Sat Dec 27 06:28:58 PST 2003 
Responsible-Changed-Why:  
Idle for far too long.  Asking Originator if problem persits. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21272 
State-Changed-From-To: feedback->closed 
State-Changed-By: andre 
State-Changed-When: Sat Dec 27 06:36:32 PST 2003 
State-Changed-Why:  
Mail to Originator bounces.  PR is far too old and many things 
have changed in USB since then.  It is very likely that problem 
has been fixed. 

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

From: Andre Oppermann <andre@freebsd.org>
To: freebsd-gnats-submit@FreeBSD.org, ap@eNTity.bnc.net
Cc:  
Subject: Re: kern/21272: USB interrupts seem to be turned off
Date: Sat, 27 Dec 2003 15:28:14 +0100

 Achim,
 
 do you still have the USB problem described in the problem
 report with FreeBSD 5.2 or -CURRENT?
 
 -- 
 Andre
 
>Unformatted:
