]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
authorDave Jiang <dave.jiang@intel.com>
Wed, 6 Nov 2013 15:50:09 +0000 (08:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:36 +0000 (11:05 -0800)
commit ac7d631f7d9f9e4e6116c4a72b6308067d0a2226 upstream.

Commit 48a9db4 (3.11) 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>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/ioat/dma_v3.c

index d8ececaf1b57082cc5709aca68714542657b5566..fa32d9f8166a546d31ccf057144a40be276ee737 100644 (file)
@@ -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;