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.

DM3730 USBnet error

Other Parts Discussed in Thread: DM3730

I am using a DM3730 platform to tftp over USBnet. The tftp transfer is failing with an "DMA transaction error with device 0". The failure correlates to the file name length in the request which impacts the packet size in the tftp request.

Are there known isues with the USB OTG? Any insight would be appreciated.

Regards,

Greg

  • Greg,

    there was a patch for the USB OTG DMA and using the SDMA instead for unaligned buffers.

    http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=commit;h=1b839bea92586e48cbd07561c2f9262e56098ec5

    "Mentor DMA on AM/DM37x requires the buffers to be aligned on a four byte
    boundary. This affects the USB CDC/RNDIS class applications as networking
    buffers are always unaligned for it.

    Fixing this by using system DMA for unaligned buffers."

    Maybe you are running into a corner case where the above patch does not quite work. Which exact buffer sizes do not work in your case?

    Thanks,

    --Gunter

  • Make sure you have the system dma setting when you do 'make menuconfig' to build a kernel. Under device drivers, usb, should look like this underneath selecting the Mentor Core:

      │ │    [ ]     Disable DMA (always use PIO)                                            │ │
      │ │    [*]       Use System DMA for Mentor DMA workaround               │ │

    Looking at the help for this:

      │ Similarly, Mentor DMA in MUSB RTL version 1.8 (OMAP3630, AM/DM37x)      │
      │ requires buffers to be aligned on a four byte boundary. This affects    │
      │ USB CDC/RNDIS class application where buffers are always unaligned.     │
      │ To work around this issue, you can choose to use System DMA for         │
      │ unaligned buffers.

    Steve K.

  • This does match our kernel configuration.

    Regards,

    Greg.

  • Greg,

     

    just another datapoint, I have verified with the AM37x-PSP out of the box uImage that the DMA transaction error occurs with the ether gadget and pings from the target to the host. The pings of sizes ..., 57, 61, 65, ... show the DMA transaction error with device 0. Other sizes work fine.

     

    root@dm3730-am3715-evm:~# ping 192.168.221.2 -s 60 -c 1
    PING 192.168.221.2 (192.168.221.2): 60 data bytes
    68 bytes from 192.168.221.2: seq=0 ttl=64 time=0.427 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.427/0.427/0.427 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -s 57 -c 1
    PING 192.168.221.2 (192.168.221.DMA transaction error with device 0
    2): 57 data bytes

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 0 packets received, 100% packet loss
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -s 61 -c 1
    PING 192.168.221.2 (192.168.221.2): 61 data bytes
    DMA transaction error with device 0

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 0 packets received, 100% packet loss
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -s 65 -c 1
    PING 192.168.221.2 (192.168.221.DMA transaction error with device 0
    2): 65 data bytes

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 0 packets received, 100% packet loss

     

    I will take a look at the kernel further, but if someone could comment on any further issues with the SDMA workaround, that would be great.

     

    Regards,

    --Gunter

  • Greg,

     

    i just used the latest kernel from arago

    http://arago-project.org/git/people/?p=sriram/ti-psp-omap.git;a=summary

    built with omap3_evm_defconfig out of the box and retested the ping tests. All pings go thru with this kernel. There must be additional patches after PSP 3.00.01.06 tag that have an impact. Can you try this?

     

    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s57
    PING 192.168.221.2 (192.168.221.2): 57 data bytes
    65 bytes from 192.168.221.2: seq=0 ttl=64 time=4.118 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 4.118/4.118/4.118 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s58
    PING 192.168.221.2 (192.168.221.2): 58 data bytes
    66 bytes from 192.168.221.2: seq=0 ttl=64 time=0.366 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.366/0.366/0.366 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s59
    PING 192.168.221.2 (192.168.221.2): 59 data bytes
    67 bytes from 192.168.221.2: seq=0 ttl=64 time=0.458 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.458/0.458/0.458 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s60
    PING 192.168.221.2 (192.168.221.2): 60 data bytes
    68 bytes from 192.168.221.2: seq=0 ttl=64 time=0.366 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.366/0.366/0.366 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s61
    PING 192.168.221.2 (192.168.221.2): 61 data bytes
    69 bytes from 192.168.221.2: seq=0 ttl=64 time=0.366 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.366/0.366/0.366 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s62
    PING 192.168.221.2 (192.168.221.2): 62 data bytes
    70 bytes from 192.168.221.2: seq=0 ttl=64 time=0.427 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max = 0.427/0.427/0.427 ms
    root@dm3730-am3715-evm:~# ping 192.168.221.2 -c1 -s63
    PING 192.168.221.2 (192.168.221.2): 63 data bytes
    71 bytes from 192.168.221.2: seq=0 ttl=64 time=0.397 ms

    --- 192.168.221.2 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss

     

    Regards,

    --Gunter