USB physical ports
Ernie Luzar
luzar722 at gmail.com
Fri Sep 11 12:04:02 UTC 2015
Patrick Hess wrote:
> Ernie Luzar wrote:
>> How can I confirm 480Mbps transfer rate.
>
> Run "dmesg -a" after plugging in the device. A USB 2.0 flash drive
> should be reported with a 40 MB/s transfer rate:
>
> da1: <Intenso Rainbow Line> Removable Direct Access SCSI-4 device
> da1: 40.000MB/s transfers
>
> You can verify this by reading from the drive, e.g. by using dd(1):
>
> # dd if=/dev/da1 of=/dev/zero bs=1M count=1024
> 1024+0 records in
> 1024+0 records out
> 1073741824 bytes transferred in 52.099073 secs (20609615 bytes/sec)
>
> That's ~20 MB/s, definitely more than USB 1.x could have delivered.
>
Yes that is true, BUT it's a very long way from 480Mbps. Following are
some test results.
Before plugging in flash drive
/root/bin >usbconfig
ugen3.1: <EHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (0mA)
ugen2.1: <UHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
After plugging in flash drive
/root/bin >usbconfig
ugen3.1: <EHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (0mA)
ugen2.1: <UHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=SAVE (0mA)
ugen3.2: <Cruzer Blade SanDisk> at usbus3, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (200mA)
Get this result no matter which physical port I plug into.
Get these console messages when plugging in flash drive
umass0: <SanDisk Cruzer Blade, class 0/0, rev 2.00/1.27, addr 2> on usbus3
umass0: SCSI over Bulk-Only; quirks = 0x8100
umass0:2:0:-1: Attached to scbus2
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <SanDisk Cruzer Blade 1.27> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 4C530001020404102235
da0: 40.000MB/s transfers
da0: 14907MB (30529536 512 byte sectors: 255H 63S/T 1900C)
da0: quirks=0x2<NO_6_BYTE>
Why is it saying 40.000MB/s transfers? Is this some max value that
Freebsd is limited to?
/root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes transferred in 0.607835 secs (17250996 bytes/sec)
/root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 5.683069 secs (18450876 bytes/sec)
/root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=200
200+0 records in
200+0 records out
209715200 bytes transferred in 11.233349 secs (18668983 bytes/sec)
/root/bin >dd if=/dev/da0 of=/dev/null bs=1M count=400
400+0 records in
400+0 records out
419430400 bytes transferred in 22.415176 secs (18711894 bytes/sec)
If 20Mbps is the max rate Freebsd can do, then 18.7Mbps is a good rate.
But the real question is why is Freebsd USB rates capped at 20Mbps when
the hardware says it's capable of 480Mbps?
More information about the freebsd-questions
mailing list