Hi all,
Running some tests on a Beaglebone board to evaluate AM335x USB performances, I've found some issues on g_mass_storage USB Gadget driver.
Everything is fine using memory mapped file as backing file, as described here . But to read/write bigger files (100 or 500 MB), I've tried to use a partition of the micro-SD card or a USB PEN Drive as backing file. Reading seems fine again, but writing is very very slow (more than 10 minutes for 500 MB), the usb device seems to be reset several times during operation, and at the end the written file is wrong. These are some logs from Beaglebone and Linux PC while writing is going on:
[ 2303.905673] gadget: high speed config #1: Linux File-Backed Storage
[ 2305.379143] usb_process_rx_queue 1460: Invalid PD popped from Rx completion queue
[ 2334.927335] gadget: high speed config #1: Linux File-Backed Storage
[ 2336.000613] cppi41_channel_abort 1251: Invalid PD popped from source queue
[ 2336.120531] usb 1-1: reset high speed USB device number 2 using musb-hdrc
[91991.271527] usb 2-1.1.2: reset high speed USB device using ehci_hcd and address 105
[92054.180366] usb 2-1.1.2: reset high speed USB device using ehci_hcd and address 105
I've tried with both stall option values (modprobe g_mass_storage file=/dev/mmcblk0p3 stall=n), but the result is the same.
By the way which is the right stall option setting for USB controller embedded in AM335x?.
The interesting thing is that I've no issues using the deprecated g_file_storage driver instead of g_mass_storage.
Everything seems fine and writing 500 MB require approx 30 secs, with nor resets neither other messages on console.
But I would not relay on a deprecated driver. Is there any known or open issue related to g_mass_storage driver?
I'm using kernel and rootfs within micro-SD provided with Beaglebone: Linux version 3.1.0-rc8 (jenkins@sdit-build01) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Sun Oct 30 06:40:25 CDT 2011.
Thanks. Regards, Max