Re: [PROBLEM] USB: gadget: usbnet bandwidth ~ 55 Mbps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 20, 2011 at 10:23 AM, Felipe Balbi <balbi@xxxxxx> wrote:
> Hi,

Hi Felipe,

Thank you for your time to answer me.

>
> On Thu, Oct 20, 2011 at 10:19:41AM +0200, Javier Martinez Canillas wrote:
>> Sorry if this is not the right place to ask this. But I didn't find an
>> USB user mailing list.
>>
>> We have a custom TI DM3730 board using a Mentor Graphics's USB
>> controller (musb_hdrc). We are using the usb ethernet gadget (g_ether)
>> to create a point-to-point ethernet network between the board and a
>> host PC.
>>
>> The problem is that even when the bus is USB 2.0 with a theoretical
>> transfer rate of 480 Mbps, we are only getting about 55 Mbps from the
>> host to the target and about 65 Mbps from the target to the host.
>>
>> We are pretty sure that the board can handle more traffic than that
>> since with a fast Ethernet 100BASE-TX connection we get about 93 Mbps.
>>
>> Is correct to get so low traffic with the usb ethernet gadget?
>
> with MUSB, yes :-s
>
> Sorry. The problem is that it has so many silicon issues that the very
> powerful mode1 DMA can't be used in all situations. Also, in case of
> ethernet packets, we will get unaligned buffers, which MUSB's internal
> DMA engine can't handle, then that packet has to be transferred via PIO.
>
> I don't think there's anything which could be done in this case :-(

I forgot to tell you more about our environment. We are using an Arago
project v2.6.37 kernel for OMAP3 devices.

We took this approach because we need some DSP specific out-of-tree
modules provided by TI (cmemk.ko  and dsplinkk.ko) and these modules
compile and work with this kernel but not with mainline.

This v2.6.37 kernel has some patches that workarounds the unaligned
buffers MUSB's DMA limitation by not using this engine and using the
system DMA. I thought these were in mainline too but now looking the
git log I realized that they weren't pushed upstream.

These are the patches on TI tree:

commit 652eef0bb93cdaf4e2d962d12be9e090fc64961a
Author: Ajay Kumar Gupta <ajay.gupta@xxxxxx>

    musb: am37x: Allow Inventra for all aligned buffers

commit 0b378096420e14781c3fba0c404e40bd4ff28472
Author: Ajay Kumar Gupta <ajay.gupta@xxxxxx>

    musb: dma: use optimal transfer element for sdma

commit 80a4ea4e8eafceccbf961ef2e4c9bf170a457ff0
Author: Ravi B <ravibabu@xxxxxx>

    musb: use system DMA for unaligned buffers on RTL >= 1.8

commit 54e22267d2431da31442e34b8bb4586cc722f23f
Author: Ajay Kumar Gupta <ajay.gupta@xxxxxx>

    musb: use system DMA to fix Inventra DMA issue on RTL-1.4


Using the system DMA instead of MUSB's DMA shouldn't give a better performance?

Thank you and best regards,

-- 
Javier Martínez Canillas
(+34) 682 39 81 69
Barcelona, Spain
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux