Thread (35 messages) flat view 35 messages, 5 authors, 2016-08-22

[PATCH] dmaengine: qcom_hidma: release the descriptor before the callback

From: lars@metafoo.de (Lars-Peter Clausen)
Date: 2016-08-04 16:00:36
Also in: linux-arm-msm, lkml

On 08/04/2016 05:38 PM, Russell King - ARM Linux wrote:
[...]
What you instead need to do is to find some way to record in your
driver that transaction 2 failed, and when dma_cookie_status() says
that a transaction has DMA_COMPLETE status, you need to look up to
see whether it failed.
In my opinion this is where the current API is broken by design. For each
transfer that fails you need to store the cookie associated with that
transfer in some kind of lookup table. Since there is no lifetime associated
with a cookie entries in this table would need to be retained forever and it
will grow unbound.

Ideally we'd mark error reporting through this interface as deprecated and
discourage new users of the interface. As far as I can see most of the few
drivers that do return DMA_ERROR get it wrong anyway, e.g. return it
unconditionally for all cookies when an error occurred for any of them.

- Lars
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help