mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
fsldma: Fix cookie issues
fsl_dma_update_completed_cookie() appears to calculate the last completed cookie incorrectly in the corner case where DMA on cookie 1 is in progress just following a cookie wrap. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu> [dan.j.williams@intel.com: fix an integer overflow warning with INT_MAX] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
6ca3a7a96e
commit
76bd061f5c
2 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,8 @@
|
|||
* if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
|
||||
*/
|
||||
typedef s32 dma_cookie_t;
|
||||
#define DMA_MIN_COOKIE 1
|
||||
#define DMA_MAX_COOKIE INT_MAX
|
||||
|
||||
#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue