AlexARL

Synchronous call to adi_dma_MemoryCopy can cause deadlock

Discussion created by AlexARL on Feb 13, 2013
Latest reply on Oct 1, 2013 by Caroll

Making a synchronous call (doesn't return until copy is finished) to adi_dma_MemoryCopy or adi_dma_MemoryCopy2D can block indefinitely if callback from the DMA manager uses the DCB instead of being live.  (Synchronous calls are made by passing NULL for the client callback function).

 

FIX:  pMemoryCopyData->TransferInProgressFlag should be changed to FALSE inside of the interrupt level of processing, instead of at the DCB level, inside of the adi_dma driver.

 

WORKAROUND:  Do not use the DCB in any memory streams you want to call synchronously.

 

At a minimum, I think this possibility for deadlock should be pointed out in the Device Drivers and System Services manual, but the driver fix should be very easy.

Outcomes