summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services
diff options
context:
space:
mode:
authorMichael Zoran <mzoran@crowfest.net>2016-10-28 10:58:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-07 11:01:43 +0100
commitdc5424ae0be4409019bafc303720d8a33f5b23fe (patch)
treeeedc39ca7c91c770fca36925919c32735a0eadf7 /drivers/staging/vc04_services
parent2a0fc8bc0c4eefc284ff10c4cebcfacdd0cb71e3 (diff)
downloadop-kernel-dev-dc5424ae0be4409019bafc303720d8a33f5b23fe.zip
op-kernel-dev-dc5424ae0be4409019bafc303720d8a33f5b23fe.tar.gz
staging: vc04_services: call sg_init_table to init scatterlist
Call the sg_init_table function to correctly initialze the DMA scatterlist. This function is required to completely initialize the list and is mandatory if DMA debugging is enabled in the build configuration. One of the purposes of sg_init_table is to set the magic "cookie" on each list element and ensure the chain end is marked. Signed-off-by: Michael Zoran <mzoran@crowfest.net> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index 12938f2..7080757 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -453,6 +453,12 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
pagelist->type = type;
pagelist->offset = offset;
+ /*
+ * Initialize the scatterlist so that the magic cookie
+ * is filled if debugging is enabled
+ */
+ sg_init_table(scatterlist, num_pages);
+ /* Now set the pages for each scatterlist */
for (i = 0; i < num_pages; i++)
sg_set_page(scatterlist + i, pages[i], PAGE_SIZE, 0);
OpenPOWER on IntegriCloud