# Is my USB 2.0 working?



## Deleted member 2077 (Jul 7, 2010)

I installed an new pci USB 2.0 card on my old server (only has usb 1) and also have a USB hard drive.  I recompiled kernel with what I believe the correct options, but the drive is still running extremely slow.

Is there any way to tell if it's using USB 2.0?  I think it is, but can anyone confirm?


```
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb1 usb2
usb3: <VIA VT6202 USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 4 ports with 4 removable, self powered
umass0: Western Digital Ext HDD 1021, rev 2.00/20.02, addr 2
```

full dmesg:

```
Copyright (c) 1992-2008 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.4-RELEASE-p9 #10: Wed Jul  7 15:23:49 CDT 2010
    feral@fire2:/usr/obj/usr/src/sys/FIRE
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) MP 2200+ (1800.08-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=0xc0480800<SYSCALL,MP,MMX+,3DNow!+,3DNow!>
real memory  = 1073217536 (1023 MB)
avail memory = 1041047552 (992 MB)
ACPI APIC Table: <PTLTD          APIC  >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  1
 cpu1 (AP): APIC ID:  0
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <PTLTD   RSDT> on motherboard
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff,0x8000-0x807f,0x8080-0x80ff iomem 0xd8000-0xdbfff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <AMD 762 host to AGP bridge> port 0x1410-0x1413 mem 0xfa000000-0xfbffffff,0xf9300000-0xf9300fff at device 0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 5.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <AMD 768 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 7.1 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pci0: <bridge> at device 7.3 (no driver attached)
3ware device driver for 9000 series storage controllers, version: 3.60.04.003
twa0: <3ware 9000 series Storage Controller> port 0x1000-0x10ff mem 0xf8000000-0xf80000ff,0xf9800000-0xf9ffffff irq 21 at device 9.0 on pci0
twa0: INFO: (0x15: 0x1300): Controller details:: Model 9500S-4LP, 4 ports, Firmware FE9X 2.08.00.006, BIOS BE9X 2.03.01.052
pcib2: <ACPI PCI-PCI bridge> at device 16.0 on pci0
pci2: <ACPI PCI bus> on pcib2
ohci0: <OHCI (generic) USB controller> mem 0xf9000000-0xf9000fff irq 19 at device 0.0 on pci2
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: AMD OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
dc0: <ADMtek AN985 10/100BaseTX> port 0x2000-0x20ff mem 0xf9001000-0xf90013ff irq 16 at device 4.0 on pci2
miibus0: <MII bus> on dc0
acphy0: <ACXXX 10/100 media interface> on miibus0
acphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:03:6d:1a:5a:31
dc1: <ADMtek AN985 10/100BaseTX> port 0x2400-0x24ff mem 0xf9001400-0xf90017ff irq 17 at device 5.0 on pci2
miibus1: <MII bus> on dc1
ukphy0: <Generic IEEE 802.3u media interface> on miibus1
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc1: Ethernet address: 00:04:5a:6d:d2:f0
uhci0: <VIA 83C572 USB controller> port 0x28c0-0x28df irq 18 at device 6.0 on pci2
uhci0: [GIANT-LOCKED]
usb1: <VIA 83C572 USB controller> on uhci0
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
uhci1: <VIA 83C572 USB controller> port 0x28e0-0x28ff irq 19 at device 6.1 on pci2
uhci1: [GIANT-LOCKED]
usb2: <VIA 83C572 USB controller> on uhci1
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
ehci0: <VIA VT6202 USB 2.0 controller> mem 0xf9001800-0xf90018ff irq 16 at device 6.2 on pci2
ehci0: [GIANT-LOCKED]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb1 usb2
usb3: <VIA VT6202 USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: VIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 4 ports with 4 removable, self powered
umass0: Western Digital Ext HDD 1021, rev 2.00/20.02, addr 2
pci2: <multimedia, audio> at device 7.0 (no driver attached)
xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x2800-0x287f mem 0xf9001c00-0xf9001c7f irq 19 at device 8.0 on pci2
miibus2: <MII bus> on xl0
ukphy1: <Generic IEEE 802.3u media interface> on miibus2
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
xl0: Ethernet address: 00:e0:81:23:29:f3
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
orm0: <ISA Option ROMs> at iomem 0xc0000-0xc7fff,0xc8000-0xc87ff,0xc8800-0xc9fff,0xe0000-0xe3fff 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
Timecounters tick every 1.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding disabled, default to deny, logging unlimited
acd0: CDRW <ARTEC WRR-52X 1.25 20030606/1.25> at ata1-master UDMA33
da0 at twa0 bus 0 target 0 lun 0
da0: <AMCC 9500S-4LP  DISK 2.08> Fixed Direct Access SCSI-3 device
da0: 100.000MB/s transfers
da0: 76283MB (156227584 512 byte sectors: 255H 63S/T 9724C)
da1 at twa0 bus 0 target 1 lun 0
da1: <AMCC 9500S-4LP  DISK 2.08> Fixed Direct Access SCSI-3 device
da1: 100.000MB/s transfers
da1: 381459MB (781228032 512 byte sectors: 255H 63S/T 48629C)
SMP: AP CPU #1 Launched!
da2 at umass-sim0 bus 0 target 0 lun 0
da2: <WD Ext HDD 1021 2002> Fixed Direct Access SCSI-4 device
da2: 40.000MB/s transfers
da2: 1907727MB (3907024896 512 byte sectors: 255H 63S/T 243201C)
Trying to mount root from ufs:/dev/da0s1a
GEOM_ELI: Device da0s1b.eli created.
GEOM_ELI: Encryption: AES-CBC 128
GEOM_ELI:     Crypto: software
dc0: TX underrun -- increasing TX threshold
dc0: TX underrun -- increasing TX threshold
xl0: transmission error: 90
xl0: tx underrun, increasing tx start threshold to 120 bytes
```


----------



## zeiz (Jul 7, 2010)

> usb3: <VIA VT6202 USB 2.0 controller> on ehci0


I use a card with exactly the same controller. First such card didn't work at all: usb drive was never on usb2 though usb2 ports were shown. 
I change the card to another one (not exactly but also with vt6202) and now it works but notably slower than "real" usb2.


----------



## Deleted member 2077 (Jul 7, 2010)

zeiz said:
			
		

> usb drive was never on usb2 though usb2 ports were shown.



how do you know it wasn't on usb2.0?


----------



## zeiz (Jul 7, 2010)

the drive always appeared on uhci but usb2 was on ehci.


----------



## phoenix (Jul 7, 2010)

It's listed in dmesg as 40.000 MBps, which means it's registering as a USB 2.0 device (40 MBps is ~400 Mbps, and 480 Mbps is the max for USB 2.0).

Depends on the drive, though, whether it ever actually hits that max speed.


----------



## Deleted member 2077 (Jul 8, 2010)

phoenix said:
			
		

> It's listed in dmesg as 40.000 MBps, which means it's registering as a USB 2.0 device (40 MBps is ~400 Mbps, and 480 Mbps is the max for USB 2.0).
> 
> Depends on the drive, though, whether it ever actually hits that max speed.



thanks!

I won't be surprised if it's a slow drive.

This is what iostat is showing.

```
[feral@fire2 ~]$ iostat -d da2 1 1000
             da2
  KB/t tps  MB/s
 123.34  57  6.84
 128.00  64  7.99
 128.00  63  7.87
 124.07  57  6.90
 128.00  54  6.74
 100.34  53  5.19
```


From wiki:


> A low-speed rate of 1.5 Mbit/s (~183 KB/s) is defined by USB 1.0.



1.5 Mbit is ~0.1875 MB, so according to iostat it's goig faster than USB 1.0; so can safety assuming it's using 2.0, yea?


----------



## aragon (Jul 8, 2010)

feralape said:
			
		

> 1.5 Mbit is ~0.1875 MB, so according to iostat it's goig faster than USB 1.0; so can safety assuming it's using 2.0, yea?


USB 1 defines two speeds, low and high.  Low is as you stated, high is 12 Mbit/sec.

In any case, yes, your drive must be using USB 2.0.  Slow drive or USB controller I guess.


----------

