mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
async_tx: build-time toggling of async_{syndrome,xor}_val dma support
ioat3.2 does not support asynchronous error notifications which makes the driver experience latencies when non-zero pq validate results are expected. Provide a mechanism for turning off async_xor_val and async_syndrome_val via Kconfig. This approach is generally useful for any driver that specifies ASYNC_TX_DISABLE_CHANNEL_SWITCH and would like to force the async_tx api to fall back to the synchronous path for certain operations. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -240,6 +240,16 @@ async_gen_syndrome(struct page **blocks, unsigned int offset, int disks,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(async_gen_syndrome);
|
||||
|
||||
static inline struct dma_chan *
|
||||
pq_val_chan(struct async_submit_ctl *submit, struct page **blocks, int disks, size_t len)
|
||||
{
|
||||
#ifdef CONFIG_ASYNC_TX_DISABLE_PQ_VAL_DMA
|
||||
return NULL;
|
||||
#endif
|
||||
return async_tx_find_channel(submit, DMA_PQ_VAL, NULL, 0, blocks,
|
||||
disks, len);
|
||||
}
|
||||
|
||||
/**
|
||||
* async_syndrome_val - asynchronously validate a raid6 syndrome
|
||||
* @blocks: source blocks from idx 0..disks-3, P @ disks-2 and Q @ disks-1
|
||||
@@ -260,9 +270,7 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
|
||||
size_t len, enum sum_check_flags *pqres, struct page *spare,
|
||||
struct async_submit_ctl *submit)
|
||||
{
|
||||
struct dma_chan *chan = async_tx_find_channel(submit, DMA_PQ_VAL,
|
||||
NULL, 0, blocks, disks,
|
||||
len);
|
||||
struct dma_chan *chan = pq_val_chan(submit, blocks, disks, len);
|
||||
struct dma_device *device = chan ? chan->device : NULL;
|
||||
struct dma_async_tx_descriptor *tx;
|
||||
unsigned char coefs[disks-2];
|
||||
|
||||
Reference in New Issue
Block a user