This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am335x - which kernel has a working USB host driver with DMA support?

I'm trying to use an rtl8188eu-based wifi stick with a BeagleBone Black board. Is there any linux kernel with solid USB host support (including DMA)?

My observations:

The 3.2.0 kernel (from am335x-evm-sdk-src-06) is the best I have found, it doesn't trigger any errors with DMA enabled, and supports about 1.2MB/s throughput with about 10% CPU load. This is really poor performance, also using an ancient kernel is not an option for me.

All other versions I've checked (beaglebone 3.8, ti-linux-kernel 3.12, Linus' 3.13) work properly only with PIO mode. In this mode I can transfer more than 5MB/s, but at the price of 90% CPU load (=unusable).

Attempting to use DMA results in an unstable connection, some kernels also spew dma-related error mesages in dmesg.

For reference, I've checked the same wifi stick on a rockchip-based board (converted tablet). With 7% CPU usage it supports about 3.6MB/s throughput.

  • Andrzej,

    Have you tried TI 3.14 kenel?

    git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
    tag ti2014.10.01.
  • Thank you for the pointer. I'm testing this kernel right now. While DMA mode seems to be working, the performance is less than ideal.

    With the same WiFi setup, I get about 3.3MB/s with 50% (!) CPU usage.

    In another test, reading data from a USB drive (dd if=/dev/sda of=/dev/null bs=1M) fully saturates the CPU while maintaining about 14MB/s transfer rate. It is a rather small improvement from the PIO mode (9MB/s with saturated CPU).

    Is the hardware capable of fast USB transfers with low CPU usage at all?
  • Andrzej,

    If you used omap2plus_defconfig, please then manually disable CONFIG_SMP. It is known SMP enabled in 3.12+ kernel on single ARM core affects USB, Ethernet (maybe other peripherals as while) perofrmance.

    With USB drives, you should get at least 17+ MB/s for read, 23+ MB/s for write, with 20~25% CPU load, if the drive is not the bottle neck.

  • I didn't have CONFIG_SMP enabled. But I've noticed that I've measured the CPU utilization incorrectly.

    When doing the transfer, 'top' shows about 20-30% cpu idle. On the other hand, when I run some cpu-heavy operation in the background, it can get about 60-70% cpu time, and the network transfer is not affected, indicating that these 60-70% of cpu time was in fact available.

    Thank you for your support.