Subject: ehci trouble with device with included hub
To: None <port-i386@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-i386
Date: 09/28/2005 16:16:07
I am trying to use an external "250 GB" disk via USB2 on a pretty
vanilla i386 box.  I think it has an Intel 845 chipset; the full dmesg
is at the end, as shown by a very recent kernel.  With a recent kernel
without ehci, plugging in the device results in

uhub3 at uhub1 port 2
uhub3: vendor 0x1058 product 0x0500, class 9/0, rev 2.00/0.07, addr 2
uhub3: 4 ports with 2 removable, self powered
umass0 at uhub3 port 2 configuration 1 interface 0
umass0: Western Digital External HDD, rev 2.00/1.12, addr 3
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
uhidev0 at uhub3 port 2 configuration 1 interface 1
uhidev0: Western Digital External HDD, rev 2.00/1.12, addr 3, iclass 3/0
uhid0 at uhidev0: input=2, output=2, feature=0
sd0 at scsibus0 target 0 lun 0: <WD, 2500JB External, 0112> disk fixed
sd0: 232 GB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors

and one can 'mount_msdos /dev/sd0e /mnt' (with a long pause)
successfully, but at slow speed.

With an ehci kernel the USB2 hub is found:

uhub3 at uhub1 port 2
uhub3: vendor 0x1058 product 0x0500, class 9/0, rev 2.00/0.07, addr 2
uhub3: 4 ports with 2 removable, self powered

but then instead of attaching the disk:

ehci0: port reset timeout
uhub3: port 4 reset failed

Further, this seems to put the hard-drive in a weird state and makes
it not work any more with usb1 - even if the drive is power cycled;
using the drive in an M$ box at USB2 seems to fix it.

ehci(4) says:

     The support for hubs that are connected with high speed upstream
     and low or full speed downstream (i.e., for transaction
     translators) is limited.

I wonder if this is the issue, with the hub in the disk having a
low/full side for the hid for the front panel buttons.

Any clues would be appreciated; I can send debug info with more
options if that would be helpful.





Full dmesg with regular (ehci) kernel and disk attached:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    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 3.99.9 (GENERIC) #8: Fri Sep 23 21:01:21 EDT 2005
	gdt@[redacated].ir.bbn.com:/n0/obj/auto-current/i386/sys/arch/i386/compile/GENERIC
total memory = 1014 MB
avail memory = 988 MB
BIOS32 rev. 0 found at 0xf0010
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium 4 (686-class), 2400.17 MHz, id 0xf27
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 400<CID>
cpu0: "Intel(R) Pentium(R) 4 CPU 2.40GHz"
cpu0: I-cache 12K uOp cache 8-way, D-cache 8 KB 64B/line 4-way
cpu0: L2 cache 512 KB 64B/line 8-way
cpu0: ITLB 4K/4M: 128 entries
cpu0: DTLB 4K/4M: 64 entries
cpu0: using thermal monitor 1
cpu0: 16 page colors
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: Intel 82845G/GL DRAM Controller / Host-Hub I/F Bridge (rev. 0x03)
agp0 at pchb0: detected 8060k stolen memory
agp0: aperture at 0xf0000000, size 0x8000000
vga1 at pci0 dev 2 function 0: Intel 82845G/GL Integrated Graphics Device (rev. 0x03)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
uhci0 at pci0 dev 29 function 0: Intel 82801DB USB UHCI Controller (rev. 0x02)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: Intel 82801DB USB UHCI Controller (rev. 0x02)
uhci1: interrupting at irq 5
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: Intel 82801DB USB UHCI Controller (rev. 0x02)
uhci2: interrupting at irq 9
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7: Intel 82801DB USB EHCI Controller (rev. 0x02)
ehci0: interrupting at irq 10
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
ppb0 at pci0 dev 30 function 0: Intel 82801BA Hub-PCI Bridge (rev. 0x82)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
fxp0 at pci1 dev 8 function 0: Intel PRO/100 VE Network Controller with 82562ET/EZ PHY, rev 130
fxp0: interrupting at irq 11
fxp0: Ethernet address [redacted]
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB LPC Interface Bridge (rev. 0x02)
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
Intel 82801DB SMBus Controller (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at irq 3
auich0: ac97: Analog Devices AD1981B codec; headphone, 20 bit DAC, no 3D stereo
auich0: ac97: ext id 601<AC97_22,AMAP,VRA>
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
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
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43: AT Timer
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
pcppi0: attached to attimer0
isapnp0: no ISA Plug 'n Play devices found
auich0: measured ac97 link rate at 48000 Hz
audio0 at auich0: full duplex, mmap, independent
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <ST340014A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 38166 MB, 77545 cyl, 16 head, 63 sec, 512 bytes/sect x 78165360 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at atabus0 drive 1: <ST380011A>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
wd1(piixide0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <SONY    CD-RW  CRX225E, , QYB2> cdrom removable
cd0: 32-bit data port
piixide0:1:0: lost interrupt
	type: ata tc_bcount: 0 tc_skip: 0
cd0: drive supports PIO mode 4piixide0:1:0: lost interrupt
	type: ata tc_bcount: 0 tc_skip: 0
, DMA mode 2piixide0:1:0: lost interrupt
	type: ata tc_bcount: 0 tc_skip: 0
, Ultra-DMA mode 2 (Ultra/33)
cd0(piixide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
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)
ehci0: port reset timeout
uhub3: port 4 reset failed

[no cd was in the drive - it worked fine with a cd to do the upgrade
from netbsd-2 to current in the hopes of getting large-msdos support
-that part worked]