| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright © 2006, Intel Corporation. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 5 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 6 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 9 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 10 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 11 | | - * more details. |
|---|
| 12 | | - * |
|---|
| 13 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 14 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 15 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 16 | | - * |
|---|
| 17 | 4 | */ |
|---|
| 18 | 5 | #ifndef _ASYNC_TX_H_ |
|---|
| 19 | 6 | #define _ASYNC_TX_H_ |
|---|
| .. | .. |
|---|
| 49 | 36 | /** |
|---|
| 50 | 37 | * async_tx_flags - modifiers for the async_* calls |
|---|
| 51 | 38 | * @ASYNC_TX_XOR_ZERO_DST: this flag must be used for xor operations where the |
|---|
| 52 | | - * the destination address is not a source. The asynchronous case handles this |
|---|
| 39 | + * destination address is not a source. The asynchronous case handles this |
|---|
| 53 | 40 | * implicitly, the synchronous case needs to zero the destination block. |
|---|
| 54 | 41 | * @ASYNC_TX_XOR_DROP_DST: this flag must be used if the destination address is |
|---|
| 55 | 42 | * also one of the source addresses. In the synchronous case the destination |
|---|
| .. | .. |
|---|
| 176 | 163 | int src_cnt, size_t len, struct async_submit_ctl *submit); |
|---|
| 177 | 164 | |
|---|
| 178 | 165 | struct dma_async_tx_descriptor * |
|---|
| 166 | +async_xor_offs(struct page *dest, unsigned int offset, |
|---|
| 167 | + struct page **src_list, unsigned int *src_offset, |
|---|
| 168 | + int src_cnt, size_t len, struct async_submit_ctl *submit); |
|---|
| 169 | + |
|---|
| 170 | +struct dma_async_tx_descriptor * |
|---|
| 179 | 171 | async_xor_val(struct page *dest, struct page **src_list, unsigned int offset, |
|---|
| 180 | 172 | int src_cnt, size_t len, enum sum_check_flags *result, |
|---|
| 181 | 173 | struct async_submit_ctl *submit); |
|---|
| 174 | + |
|---|
| 175 | +struct dma_async_tx_descriptor * |
|---|
| 176 | +async_xor_val_offs(struct page *dest, unsigned int offset, |
|---|
| 177 | + struct page **src_list, unsigned int *src_offset, |
|---|
| 178 | + int src_cnt, size_t len, enum sum_check_flags *result, |
|---|
| 179 | + struct async_submit_ctl *submit); |
|---|
| 182 | 180 | |
|---|
| 183 | 181 | struct dma_async_tx_descriptor * |
|---|
| 184 | 182 | async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, |
|---|
| .. | .. |
|---|
| 188 | 186 | struct dma_async_tx_descriptor *async_trigger_callback(struct async_submit_ctl *submit); |
|---|
| 189 | 187 | |
|---|
| 190 | 188 | struct dma_async_tx_descriptor * |
|---|
| 191 | | -async_gen_syndrome(struct page **blocks, unsigned int offset, int src_cnt, |
|---|
| 189 | +async_gen_syndrome(struct page **blocks, unsigned int *offsets, int src_cnt, |
|---|
| 192 | 190 | size_t len, struct async_submit_ctl *submit); |
|---|
| 193 | 191 | |
|---|
| 194 | 192 | struct dma_async_tx_descriptor * |
|---|
| 195 | | -async_syndrome_val(struct page **blocks, unsigned int offset, int src_cnt, |
|---|
| 193 | +async_syndrome_val(struct page **blocks, unsigned int *offsets, int src_cnt, |
|---|
| 196 | 194 | size_t len, enum sum_check_flags *pqres, struct page *spare, |
|---|
| 197 | | - struct async_submit_ctl *submit); |
|---|
| 195 | + unsigned int s_off, struct async_submit_ctl *submit); |
|---|
| 198 | 196 | |
|---|
| 199 | 197 | struct dma_async_tx_descriptor * |
|---|
| 200 | 198 | async_raid6_2data_recov(int src_num, size_t bytes, int faila, int failb, |
|---|
| 201 | | - struct page **ptrs, struct async_submit_ctl *submit); |
|---|
| 199 | + struct page **ptrs, unsigned int *offs, |
|---|
| 200 | + struct async_submit_ctl *submit); |
|---|
| 202 | 201 | |
|---|
| 203 | 202 | struct dma_async_tx_descriptor * |
|---|
| 204 | 203 | async_raid6_datap_recov(int src_num, size_t bytes, int faila, |
|---|
| 205 | | - struct page **ptrs, struct async_submit_ctl *submit); |
|---|
| 204 | + struct page **ptrs, unsigned int *offs, |
|---|
| 205 | + struct async_submit_ctl *submit); |
|---|
| 206 | 206 | |
|---|
| 207 | 207 | void async_tx_quiesce(struct dma_async_tx_descriptor **tx); |
|---|
| 208 | 208 | #endif /* _ASYNC_TX_H_ */ |
|---|