Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
libs/llio: workaround to fix DMA wait completion
Browse files Browse the repository at this point in the history
For now, we must wait for BUSY bit to go down,
as DONE is always 1.

This is related to github issue #154.
  • Loading branch information
lerwys committed Apr 3, 2017
1 parent 453eb8d commit f46f687
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/llio/src/llio/c/ops/ll_io_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,11 @@ static int _pcie_wait_dma (llio_t *self, pcie_dev_dma_type_e dma_type, bool bloc
"[ll_io_pcie:_pcie_wait_dma] Waiting for DMA engine\n");
int err = 0;
/*FIXME. Should we insert a maximum number of wait tries? */
while ((err = _pcie_check_dma_completion (self, dma_type)) && block);
/* FIXME 2: For now, we must check the DONE and BUSY bits.
* The DONE bit is always 1, so maybe we need to check
* FPGA reset signal */
while ((err = (_pcie_check_dma_completion (self, dma_type) ||
_pcie_check_dma_busy (self, dma_type))) && block);

return err;
}
Expand Down

0 comments on commit f46f687

Please sign in to comment.