diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:09:26 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:09:26 -0400 |
commit | ad283ea4a3ce82cda2efe33163748a397b31b1eb (patch) | |
tree | 11cd739195f336895abe9e4a62d824e49a41c24f /include/linux/dmaengine.h | |
parent | d6f38f31f3ad4b0dd33fe970988f14e7c65ef702 (diff) |
async_tx: add sum check flags
Replace the flat zero_sum_result with a collection of flags to contain
the P (xor) zero-sum result, and the soon to be utilized Q (raid6 reed
solomon syndrome) zero-sum result. Use the SUM_CHECK_ namespace instead
of DMA_ since these flags will be used on non-dma-zero-sum enabled
platforms.
Reviewed-by: Andre Noll <maan@systemlinux.org>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 6768727d00d7..02447afcebad 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -87,6 +87,25 @@ enum dma_ctrl_flags { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * enum sum_check_bits - bit position of pq_check_flags | ||
91 | */ | ||
92 | enum sum_check_bits { | ||
93 | SUM_CHECK_P = 0, | ||
94 | SUM_CHECK_Q = 1, | ||
95 | }; | ||
96 | |||
97 | /** | ||
98 | * enum pq_check_flags - result of async_{xor,pq}_zero_sum operations | ||
99 | * @SUM_CHECK_P_RESULT - 1 if xor zero sum error, 0 otherwise | ||
100 | * @SUM_CHECK_Q_RESULT - 1 if reed-solomon zero sum error, 0 otherwise | ||
101 | */ | ||
102 | enum sum_check_flags { | ||
103 | SUM_CHECK_P_RESULT = (1 << SUM_CHECK_P), | ||
104 | SUM_CHECK_Q_RESULT = (1 << SUM_CHECK_Q), | ||
105 | }; | ||
106 | |||
107 | |||
108 | /** | ||
90 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. | 109 | * dma_cap_mask_t - capabilities bitmap modeled after cpumask_t. |
91 | * See linux/cpumask.h | 110 | * See linux/cpumask.h |
92 | */ | 111 | */ |
@@ -245,7 +264,7 @@ struct dma_device { | |||
245 | unsigned int src_cnt, size_t len, unsigned long flags); | 264 | unsigned int src_cnt, size_t len, unsigned long flags); |
246 | struct dma_async_tx_descriptor *(*device_prep_dma_xor_val)( | 265 | struct dma_async_tx_descriptor *(*device_prep_dma_xor_val)( |
247 | struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt, | 266 | struct dma_chan *chan, dma_addr_t *src, unsigned int src_cnt, |
248 | size_t len, u32 *result, unsigned long flags); | 267 | size_t len, enum sum_check_flags *result, unsigned long flags); |
249 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( | 268 | struct dma_async_tx_descriptor *(*device_prep_dma_memset)( |
250 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, | 269 | struct dma_chan *chan, dma_addr_t dest, int value, size_t len, |
251 | unsigned long flags); | 270 | unsigned long flags); |