summaryrefslogtreecommitdiffstats
path: root/include/linux/dmaengine.h
diff options
context:
space:
mode:
authorSteven J. Magnani2010-03-01 06:18:16 +0100
committerDan Williams2010-03-01 06:18:16 +0100
commit76bd061f5c7b7550cdaed68ad6219ea7cee288fc (patch)
tree5ae663b8bab6bd77cab2b8bc095c0743cc2da138 /include/linux/dmaengine.h
parentfsldma: Fix cookie issues (diff)
downloadkernel-qcow2-linux-76bd061f5c7b7550cdaed68ad6219ea7cee288fc.tar.gz
kernel-qcow2-linux-76bd061f5c7b7550cdaed68ad6219ea7cee288fc.tar.xz
kernel-qcow2-linux-76bd061f5c7b7550cdaed68ad6219ea7cee288fc.zip
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>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r--include/linux/dmaengine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 78784982b33e..4d8d619f28bc 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -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)