AnsweredAssumed Answered

USB OTG Mass Storage Pefromance

Question asked by MATTHEW REYNOLDS on Jun 4, 2014
Latest reply on Jun 18, 2014 by MATTHEW REYNOLDS
Branched to a new discussion

Greetings All,


I am getting sub-par read performance from the USB OTG port of a IMX6Q in host mode.  The g_mass_storage driver is used with a mSATA SSD drive file backing to transfer many large files (up to ninety ~350MB files) from the IMX's to my PC.  However, read transfer rates are around 2-3 MB per second with my expectation for the high speed port to be 20+ MBs.


The software release we are using is the Yocto 3.10.17 dora release.  I checked everything I could think of in the IMX6 system and from what I can tell the drivers are configured for hi-speed 480mps.  It should also be noted that the mSATA SSD drive is formatted as a FAT32.


Mass Storage Setup

unmount /media/sda1

modprobe g_mass_storage file=/dev/sda


The  following is printed after loading the g_mass_storage module.
g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
g_mass_storage gadget: userspace failed to provide iSerialNumber
g_mass_storage gadget: g_mass_storage ready

g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage

"lsusb -t" prints
/:  Bus 01.Port 1: Dev 1, class="root_hub", Driver=ci_hdrc/1p, 480M

sys info verifies usb device 1 version is 2.0 and speed is 480 mps
# /sys/bus/usb/devices/usb1/version

# /sys/bus/usb/devices/usb1/speed

The Write and Read performance of the SSD drive using dd commands has been very good at +60MBs so I don't think it is the bottleneck.  Although, I am getting the following errors when reading from the device.  Hopefully this can be cleared up with a reformat and this does not indicate the drive is failing.

ata1.00: status: { DRDY }

ata1: hard resetting link

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

ata1.00: configured for UDMA/33

ata1: EH complete

ata1.00: exception Emask 0x10 SAct 0x1 SErr 0x280100 action 0x6 frozen

ata1.00: irq_stat 0x08000000, interface fatal error

ata1: SError: { UnrecovData 10B8B BadCRC }

ata1.00: failed command: READ FPDMA QUEUED

ata1.00: cmd 60/00:00:f8:f4:01/01:00:00:00:00/40 tag 0 ncq 131072 in

         res 40/00:04:f8:f4:01/00:00:00:00:00/40 Emask 0x10 (ATA bus error)

Can anyone help explain the slow transfer rates?



Mistakenly said SD instead of SSD


Message was edited by: Matthew Reynolds