Getting USB2 on FreeBSD 5.3?

Paul Hoffman phoffman at proper.com
Sat Jan 8 13:26:40 PST 2005


[[ Copied and amended from the thread of similar name on freebsd-questions. ]]

Greetings again. I have a no-name USB 2 controller card in my server 
running FreeBSD 5.3. I rebuilt the kernel with the ehci driver 
(simply by adding a line to copy of GENERIC and rebuilding). The box 
already has two USB 1 ports. The dmesg says:

. . .
ohci0: <NEC uPD 9210 USB controller> mem 0xfe123000-0xfe123fff irq 18 
at device 3.0 on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0
usb0: <NEC uPD 9210 USB controller> on ohci0
usb0: USB revision 1.0
uhub0: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1: <NEC uPD 9210 USB controller> mem 0xfe122000-0xfe122fff irq 19 
at device 3.1 on pci0
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0
usb1: <NEC uPD 9210 USB controller> on ohci1
usb1: USB revision 1.0
uhub1: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ehci0: <NEC uPD 720100 USB 2.0 controller> mem 0xfe124000-0xfe1240ff 
irq 18 at device 3.2 on pci0
ehci0: [GIANT-LOCKED]
ehci_pci_attach: companion usb0
ehci_pci_attach: companion usb1
usb2: EHCI version 0.95
usb2: companion controllers, 3 ports each: usb0 usb1
usb2: <NEC uPD 720100 USB 2.0 controller> on ehci0
usb2: USB revision 2.0
uhub2: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 5 ports with 5 removable, self powered
. . .
ohci2: <OHCI (generic) USB controller> mem 0xfe120000-0xfe120fff irq 
3 at device 15.2 on pci0
ohci2: [GIANT-LOCKED]
usb3: OHCI version 1.0, legacy support
usb3: SMM does not respond, resetting
usb3: <OHCI (generic) USB controller> on ohci2
usb3: USB revision 1.0
uhub3: (0x1166) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered

When I plug in a USB 2 IDE adapter to the USB 2 card, I see:

umass0: Myson Century, Inc. USB Mass Storage Device, rev 2.00/a3.01, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <ST312002 6A 3.04> Fixed Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)

The transfers happen at USB 1, not USB 2 speeds, which is of course 
not what I want.

I can't tell why da0 is getting the slow (USB 1) mode. I also can't 
figure out what the heck ohci2 is; there is only the on-board USB 1 
ports (which I assume are ohci0 and ohci1) and the card (which is 
clearly ehci0). Is ohci2 possibly also running on the add-in card and 
stomping on ehci0?

I guess a related question is how can I tell what device umass0 
thinks it is plugged into?

[[ Robert Huff replied:
         The last I remember, the ehci driver was closer to alpha than
beta quality (as in both flakey and feature-sparse).  You should
probably check the usb@ mailing list archives and even the commit
logs for more information.
]]

[[ John Wilson replied:
For what it's worth, I too am using ehci with a USB2 HD based MP3 player, and
it is being reported similarly as well in regard to the 1.000MB/s transfer
rate.  However, according to `systat -vmstat`, I am seeing transfers in the
area of 8MB/s.  In regard to stability, I've had no issues at all with it.
I'm sure this doesn't help at all. ;p
]]

[[ I replied:
Actually, it helps some. I am seeing similar results (well, 7.1
MB/s), so this is a bit heartening. But it doesn't explain why we're
not seeing the 50 MB/s we're supposed to be seeing.
]]

So, my question to the USB-specific list is: what should I be doing 
differently to get closer to the 50MB/sec expected from USB2?

--Paul Hoffman


More information about the freebsd-usb mailing list