Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185756
b: refs/heads/master
c: 76bd061
h: refs/heads/master
v: v3
  • Loading branch information
Steven J. Magnani authored and Dan Williams committed Mar 1, 2010
1 parent b972386 commit da052f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ca3a7a96e91b1aa8c704153c992b191d35b5747
refs/heads/master: 76bd061f5c7b7550cdaed68ad6219ea7cee288fc
5 changes: 4 additions & 1 deletion trunk/drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,11 @@ static void fsl_dma_update_completed_cookie(struct fsldma_chan *chan)
desc = to_fsl_desc(chan->ld_running.prev);
if (dma_is_idle(chan))
cookie = desc->async_tx.cookie;
else
else {
cookie = desc->async_tx.cookie - 1;
if (unlikely(cookie < DMA_MIN_COOKIE))
cookie = DMA_MAX_COOKIE;
}

chan->completed_cookie = cookie;

Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/dmaengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit da052f3

Please sign in to comment.