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.

DMA error in linux while testing USB

I am using the Am389x EVK platform, and using below SDK

ti-ezsdk_dm816x-evm_5_01_01_80 and linux-2.6.37-psp04.00.00.10

When testing the USB, DMA was enabled by default, but during the testing , i am getting below error

root@dm816x-evm:/# kernel BUG at arch/arm/mm/dma-mapping.c:425!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000

--- USB support
[*]   Disable DMA (always use PIO)

When the DMA option was disabled and PIO was used, it was working fine

I was testing the multi gadget driver, with USB as device

Is it a bug in the DMA in the standard release ?

 

Robin

 

 

 

 

 

  • Hi,

    Can you describe the test you are doing?

    You mention a multi gadget driver, can you provide details?

     

    Regards,

    Benoit


    P.S. If this response helps answer your question please mark this post as verified - Thanks
  • I am trying to test the multi-gadget functionality of the USB 2.0 Host.

    When i build this particular driver as module and insert the module using insmod, [on linux target]

    the module is getting loaded. and when the USB cable is connected to host pc from target,

    the necessary drivers is loaded on host pc, and a drive appears in my computer [ file / drive mentioned while loading gadget driver on target file=/dev/mmcblk0p1 ] 

    also i assign the ip address for usb0 I/F on the linux target and do the same on the host pc.

    so now i am able to ping to the board.  so i use drive as well as ethernet over USB .

    This working perfectly fine. Only problem is USB is operating in non-DMA mode.

    if i enable the DMA, i get the error earlier mentioned. [ when copying a file to drive on the host pc]

    The DMA logic is generic, so i was wondering whether the existing release has bug or not, if yes what is the fix ?

     

    Regards,

    Robin

  • Robin,

    Internally we do not have a multi-gadget configuration to test with.

    However I did notice some usb dma fixes/changes in the psp-04.00.00.12 (included in ti-ezsdk_dm816x-evm_5_02_01_59) which may affect this.

    Just so i am clear, the dma issue manifest itself when you have both a ping going on the rndis endpoint and a file transfer going on the other, correct?

    If you only have one active transfer does it work correctly?

     

    Regards,

    Benoit