USB Bulk IN slow on Cyclone V
In our company we have a custom board using Cyclone V 5CSEBA2U19C8SN and USB 3300. We use Linux 4.1.15, build it with Buildroot 2015.11.1. One of my tasks is to setup USB Gadget subsystem. I use combination of FunctionFS and ConfigFS to create a configuration with two bulk endpoints (in and out). It works, but I noticed that while bulk out (host to device) transfers at 20MB/s, bulk in (device to host) transfers at 10MB/s only. I tried mass storage gadget (g_mass_storage, alone, not in combination with my configuration) and got the same results: host to device at 20MB/s, device to host at 10MB/s. It seems odd to me that reading would be 50% slower than writing, I would expect these two at approximately the same speed. Is this normal? Why? If not, what steps should I take to find the cause?