aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/async_tx/async_xor.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-04-08 17:28:37 -0400
committerDan Williams <dan.j.williams@intel.com>2009-04-08 17:28:37 -0400
commit099f53cb50e45ef617a9f1d63ceec799e489418b (patch)
treefd57f259f58bcf615fe2b17734ed0cbec612782d /crypto/async_tx/async_xor.c
parentfd74ea65883c7e6903e9b652795f72b723a2be69 (diff)
async_tx: rename zero_sum to val
'zero_sum' does not properly describe the operation of generating parity and checking that it validates against an existing buffer. Change the name of the operation to 'val' (for 'validate'). This is in anticipation of the p+q case where it is a requirement to identify the target parity buffers separately from the source buffers, because the target parity buffers will not have corresponding pq coefficients. 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 'crypto/async_tx/async_xor.c')
-rw-r--r--crypto/async_tx/async_xor.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index 95fe2c8d6c51..e0580b0ea533 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -222,7 +222,7 @@ static int page_is_zero(struct page *p, unsigned int offset, size_t len)
222} 222}
223 223
224/** 224/**
225 * async_xor_zero_sum - attempt a xor parity check with a dma engine. 225 * async_xor_val - attempt a xor parity check with a dma engine.
226 * @dest: destination page used if the xor is performed synchronously 226 * @dest: destination page used if the xor is performed synchronously
227 * @src_list: array of source pages. The dest page must be listed as a source 227 * @src_list: array of source pages. The dest page must be listed as a source
228 * at index zero. The contents of this array may be overwritten. 228 * at index zero. The contents of this array may be overwritten.
@@ -236,13 +236,13 @@ static int page_is_zero(struct page *p, unsigned int offset, size_t len)
236 * @cb_param: parameter to pass to the callback routine 236 * @cb_param: parameter to pass to the callback routine
237 */ 237 */
238struct dma_async_tx_descriptor * 238struct dma_async_tx_descriptor *
239async_xor_zero_sum(struct page *dest, struct page **src_list, 239async_xor_val(struct page *dest, struct page **src_list,
240 unsigned int offset, int src_cnt, size_t len, 240 unsigned int offset, int src_cnt, size_t len,
241 u32 *result, enum async_tx_flags flags, 241 u32 *result, enum async_tx_flags flags,
242 struct dma_async_tx_descriptor *depend_tx, 242 struct dma_async_tx_descriptor *depend_tx,
243 dma_async_tx_callback cb_fn, void *cb_param) 243 dma_async_tx_callback cb_fn, void *cb_param)
244{ 244{
245 struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_ZERO_SUM, 245 struct dma_chan *chan = async_tx_find_channel(depend_tx, DMA_XOR_VAL,
246 &dest, 1, src_list, 246 &dest, 1, src_list,
247 src_cnt, len); 247 src_cnt, len);
248 struct dma_device *device = chan ? chan->device : NULL; 248 struct dma_device *device = chan ? chan->device : NULL;
@@ -261,15 +261,15 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
261 dma_src[i] = dma_map_page(device->dev, src_list[i], 261 dma_src[i] = dma_map_page(device->dev, src_list[i],
262 offset, len, DMA_TO_DEVICE); 262 offset, len, DMA_TO_DEVICE);
263 263
264 tx = device->device_prep_dma_zero_sum(chan, dma_src, src_cnt, 264 tx = device->device_prep_dma_xor_val(chan, dma_src, src_cnt,
265 len, result, 265 len, result,
266 dma_prep_flags); 266 dma_prep_flags);
267 if (unlikely(!tx)) { 267 if (unlikely(!tx)) {
268 async_tx_quiesce(&depend_tx); 268 async_tx_quiesce(&depend_tx);
269 269
270 while (!tx) { 270 while (!tx) {
271 dma_async_issue_pending(chan); 271 dma_async_issue_pending(chan);
272 tx = device->device_prep_dma_zero_sum(chan, 272 tx = device->device_prep_dma_xor_val(chan,
273 dma_src, src_cnt, len, result, 273 dma_src, src_cnt, len, result,
274 dma_prep_flags); 274 dma_prep_flags);
275 } 275 }
@@ -296,7 +296,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list,
296 296
297 return tx; 297 return tx;
298} 298}
299EXPORT_SYMBOL_GPL(async_xor_zero_sum); 299EXPORT_SYMBOL_GPL(async_xor_val);
300 300
301static int __init async_xor_init(void) 301static int __init async_xor_init(void)
302{ 302{