Lines Matching refs:blocks

20 /* the struct page *blocks[] parameter passed to async_gen_syndrome()
22 * blocks[disks-2] and the 'Q' destination address at blocks[disks-1]
107 do_sync_gen_syndrome(struct page **blocks, unsigned int *offsets, int disks,
117 srcs = (void **) blocks;
120 if (blocks[i] == NULL) {
124 srcs[i] = page_address(blocks[i]) + offsets[i];
157 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
159 * @disks: number of blocks (including missing P or Q, see below)
167 * both) from the calculation by setting blocks[disks-2] or
168 * blocks[disks-1] to NULL. When P or Q is omitted 'len' must be <=
171 * buffers. If any source buffers (blocks[i] where i < disks - 2) are
177 async_gen_syndrome(struct page **blocks, unsigned int *offsets, int disks,
182 &P(blocks, disks), 2,
183 blocks, src_cnt, len);
187 BUG_ON(disks > MAX_DISKS || !(P(blocks, disks) || Q(blocks, disks)));
211 if (blocks[i] == NULL)
213 unmap->addr[j] = dma_map_page(device->dev, blocks[i],
225 if (P(blocks, disks))
226 unmap->addr[j++] = dma_map_page(device->dev, P(blocks, disks),
235 if (Q(blocks, disks))
236 unmap->addr[j++] = dma_map_page(device->dev, Q(blocks, disks),
257 if (!P(blocks, disks)) {
258 P(blocks, disks) = pq_scribble_page;
261 if (!Q(blocks, disks)) {
262 Q(blocks, disks) = pq_scribble_page;
265 do_sync_gen_syndrome(blocks, offsets, disks, len, submit);
272 pq_val_chan(struct async_submit_ctl *submit, struct page **blocks, int disks, size_t len)
277 return async_tx_find_channel(submit, DMA_PQ_VAL, NULL, 0, blocks,
283 * @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
285 * @disks: number of blocks (including missing P or Q, see below)
292 * The same notes from async_gen_syndrome apply to the 'blocks',
298 async_syndrome_val(struct page **blocks, unsigned int *offsets, int disks,
302 struct dma_chan *chan = pq_val_chan(submit, blocks, disks, len);
325 if (likely(blocks[i])) {
326 unmap->addr[j] = dma_map_page(dev, blocks[i],
335 if (!P(blocks, disks)) {
339 pq[0] = dma_map_page(dev, P(blocks, disks),
345 if (!Q(blocks, disks)) {
349 pq[1] = dma_map_page(dev, Q(blocks, disks),
374 struct page *p_src = P(blocks, disks);
376 struct page *q_src = Q(blocks, disks);
404 blocks, offsets, disks-2, len, submit);
412 P(blocks, disks) = NULL;
413 Q(blocks, disks) = spare;
416 tx = async_gen_syndrome(blocks, offsets, disks,
425 P(blocks, disks) = p_src;
427 Q(blocks, disks) = q_src;