diff mbox

ioatdma: Fix bug in selftest after removal of DMA_MEMSET.

Message ID 1383753009-30022-1-git-send-email-dave.jiang@intel.com (mailing list archive)
State Accepted
Commit ac7d631f7d9f9e4e6116c4a72b6308067d0a2226
Delegated to: Dan Williams
Headers show

Commit Message

Dave Jiang Nov. 6, 2013, 3:50 p.m. UTC
From: Dave Jiang <dave.jiang@intel.com>

Commit 48a9db4 removed the memset op in the xor selftest for ioatdma.
The issue is that with the removal of that op, it never replaced the
memset with a CPU memset. The memory being operated on is expected to
be zeroes but was not. This is causing the xor selftest to fail.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/dma/ioat/dma_v3.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Dave Jiang Nov. 6, 2013, 3:54 p.m. UTC | #1
On Wed, 2013-11-06 at 08:50 -0700, dave.jiang@intel.com wrote:
> From: Dave Jiang <dave.jiang@intel.com>

> 


Adding Vinod. I messed up my git send-email parameters. 

> Commit 48a9db4 removed the memset op in the xor selftest for ioatdma.

> The issue is that with the removal of that op, it never replaced the

> memset with a CPU memset. The memory being operated on is expected to

> be zeroes but was not. This is causing the xor selftest to fail.

> 

> Signed-off-by: Dave Jiang <dave.jiang@intel.com>

> ---

>  drivers/dma/ioat/dma_v3.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c

> index d8ececa..fa32d9f 100644

> --- a/drivers/dma/ioat/dma_v3.c

> +++ b/drivers/dma/ioat/dma_v3.c

> @@ -1545,6 +1545,8 @@ static int ioat_xor_val_self_test(struct ioatdma_device *device)

>  		goto free_resources;

>  	}

>  

> +	memset(page_address(dest), 0, PAGE_SIZE);

> +

>  	/* test for non-zero parity sum */

>  	op = IOAT_OP_XOR_VAL;

>
diff mbox

Patch

diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index d8ececa..fa32d9f 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1545,6 +1545,8 @@  static int ioat_xor_val_self_test(struct ioatdma_device *device)
 		goto free_resources;
 	}
 
+	memset(page_address(dest), 0, PAGE_SIZE);
+
 	/* test for non-zero parity sum */
 	op = IOAT_OP_XOR_VAL;