diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-06-29 18:08:39 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-06-30 05:23:15 +0200 |
commit | d3183447ef561efe7e734cb4bc331519c276a786 (patch) | |
tree | 564846266b386037e7cbf50f0ac3b16823cbb3fb /COPYING | |
parent | dmaengine: tegra-apb: Remove duplicated residue calculation (diff) | |
download | linux-d3183447ef561efe7e734cb4bc331519c276a786.tar.xz linux-d3183447ef561efe7e734cb4bc331519c276a786.zip |
dmaengine: tegra-apb: Return the actual descriptor status
Commit 71f7e6cc5500 ('dmaengine: tegra20-apb-dma: Only calculate residue
if txstate exists') changed the tegra_dma_tx_status() function to only
calculate the residue if there is a valid 'txstate' pointer for storing
the residue. Although this makes sense, this changed the behaviour of
the function tegra_dma_tx_status() such that if the pointer 'txstate' is
not valid, then we will return whatever state is returned by
dma_cookie_status() and no longer return the state by looking up the DMA
descriptor and returning it's state.
Please note that dma_cookie_status() will either return DMA_COMPLETE or
DMA_IN_PROGRESS. However, if dma_cookie_status() returns DMA_IN_PROGRESS
the actual status could be DMA_ERROR which will only be seen from
checking the descriptor status. Therefore, even if 'txstate' is not
valid, still check to see if there is a valid descriptor for the cookie
in question and if so return the descriptor state. Finally, ensure the
residue is still not calculated if the 'txstate' is not valid.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions