* [PATCH] dmatest: correct raid6 PQ test
@ 2010-02-15 21:35 Anatolij Gustschin
2010-03-01 3:40 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Anatolij Gustschin @ 2010-02-15 21:35 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Anatolij Gustschin, Dan Williams, Maciej Sosnowski
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>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
---
drivers/dma/dmatest.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 948d563..9ae3d11 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);
}
--
1.6.3.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dmatest: correct raid6 PQ test
2010-02-15 21:35 [PATCH] dmatest: correct raid6 PQ test Anatolij Gustschin
@ 2010-03-01 3:40 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2010-03-01 3:40 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linux-kernel, Andrew Morton, Maciej Sosnowski
On Mon, Feb 15, 2010 at 2:35 PM, Anatolij Gustschin <agust@denx.de> wrote:
> 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>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
> ---
> drivers/dma/dmatest.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Applied... and the same problem for the xor case (I'll fix that up).
--
Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-01 3:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-15 21:35 [PATCH] dmatest: correct raid6 PQ test Anatolij Gustschin
2010-03-01 3:40 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®