I have a board with Cyclone V SE, which contains ARM CortexTM-A9 MPCore (single core). On this board I run linux 4.1.15 built using Buildroot. When testing USB it turned out that while Bulk OUT transfers run at about 20MB/s, Bulk IN transfers run at about 10MB/s. For this measurement I used g_zero on device and a simple libusb based program on host.The second measurement was done using g_mass_storage on device side and dd on host side. Same results.Last test was done using a combination of ConfigFS, FunctionFS and my userspace application that read/wrote data from/to RAM. There I got 10MB/s IN, but up to 40MB/s OUT. I expected the speeds to be roughly equal (at least when working with RAM).I checked the bulk in protocol in USB in a nutshell and don't see any obvious reason why IN should be significantly slower than OUT.Now I know that there are too many things that can cause this and I don't expect a The slowness is caused by... answer. But where should I dig and what tools should I use to track it down?
How to diagnose slow USB transfer from embedded linux?
usb;embedded