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.
You are correct that there is an issue with the DMA alignment. The below patches take care of the mis-alignment and increase the USB-Ethernet throughput. These patches are based on the 4AI.1.4 release for Blaze / Blaze Tablet (http://omappedia.org/wiki/4AI.1.4_OMAP4_Icecream_Sandwich_Release_Notes ), so you may need to modify them slightly to fit your Pandaboard codebase:
http://review.omapzoom.org/22482 usb: musb: implement (un)map_urb_for_dma hooks http://review.omapzoom.org/22486 usb: hcd: Add a dma_align flag http://review.omapzoom.org/22489 usbnet: dma alignement fixhttp://review.omapzoom.org/22487 usb: musb: indicate DMA alignement requirement http://review.omapzoom.org/22488 usb: ehci-omap: indicate DMA alignement requirement (optional: for EHCI)
What bootargs are you using on the Pandaboard? Are you setting the vmalloc parameter? By default, the 4AI.1.4 release for Blaze / Blaze Tablet uses vmalloc=768M. While increasing the amount of address space available for virtual addressing, a high vmalloc value has the side effect of moving most userspace allocations into highmem, which causes extra overhead for creating the kernel mapping. With a lower vmalloc value (such as 128M), the USB-Ethernet throughput improved in our testing.
Please click the Verify Answer button on this post if it answers your question
Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Gina Glaser:
Thanks for your quick reply.
As I already mentioned, I already have a workaround to pass 4-byte aligned buffer address to DMA. However, I will check your patches for proper fix. Now, the issue is: even without the alignment issue, DMA seems to be slow in reading the packets. In the musb_gadget code, I found a comment which says "DMA is slow for RX/OUT for typical case (short_not_ok is 0, i.e, DMA mode 0)". For USB-Ethernet, Short_not_ok is 0. Is there a real issue in DMA apart from alignment issue which makes the transfer slow for RX/OUT?
I will also check the vmalloc value and get back to you.
In reply to Gunasekaran Dharman:
I tested with vmalloc=128M, but the Ethernet over USB performance for Host to Device didn't improve.
DMA transfer seems slow for RX/OUT even without alignment issue. Why is it so? Is there any known hardware issue?
The difference in USB transfer throughput between RX and TX is not due to the DMA alignment issue, but to the mode that is being used. We use DMA mode 1 for TX transfers and DMA mode 0 for RX transfers, so RX will always be slower. This is by design, since in the TX case, the MUSB driver knows how much data it is sending and can make use of the DMA done interrupt.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.