aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-02-15 22:35:23 +0100
committerDan Williams <dan.j.williams@intel.com>2010-02-28 22:18:36 -0700
commit94de648d72c8bc833590523f22386d4babbea988 (patch)
tree8507157200c687012e13da8a5ea5088528c0151f /drivers/dma
parent76bd061f5c7b7550cdaed68ad6219ea7cee288fc (diff)
downloadkernel_goldelico_gta04-94de648d72c8bc833590523f22386d4babbea988.zip
kernel_goldelico_gta04-94de648d72c8bc833590523f22386d4babbea988.tar.gz
kernel_goldelico_gta04-94de648d72c8bc833590523f22386d4babbea988.tar.bz2
dmatest: correct raid6 PQ test
The number of PQ sources specified by module parameter "pq_sources" is always forced odd to fit into dmatest's destination verificaton scheme. But number of PQ sources and coefficients as passed to the driver's prep_dma_pq() is not adjusted accordingly. Fix it now to get correct PQ testing results in the case passed "pq_sources" parameter is even. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmatest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 8b90516..cc0f329 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -237,7 +237,7 @@ static int dmatest_func(void *data)
dma_cookie_t cookie;
enum dma_status status;
enum dma_ctrl_flags flags;
- u8 pq_coefs[pq_sources];
+ u8 pq_coefs[pq_sources + 1];
int ret;
int src_cnt;
int dst_cnt;
@@ -257,7 +257,7 @@ static int dmatest_func(void *data)
} else if (thread->type == DMA_PQ) {
src_cnt = pq_sources | 1; /* force odd to ensure dst = src */
dst_cnt = 2;
- for (i = 0; i < pq_sources; i++)
+ for (i = 0; i < src_cnt; i++)
pq_coefs[i] = 1;
} else
goto err_srcs;
@@ -355,7 +355,7 @@ static int dmatest_func(void *data)
for (i = 0; i < dst_cnt; i++)
dma_pq[i] = dma_dsts[i] + dst_off;
tx = dev->device_prep_dma_pq(chan, dma_pq, dma_srcs,
- pq_sources, pq_coefs,
+ src_cnt, pq_coefs,
len, flags);
}