summaryrefslogtreecommitdiffstats
path: root/pcilib/dma.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-11-17 18:23:48 +0100
committerSuren A. Chilingaryan <csa@suren.me>2015-11-17 18:23:48 +0100
commit52e32b2c9f0e5ac7cfb31fd2306e6536340955e1 (patch)
tree720e376325d14f6713df434e031c503ba8f33c1e /pcilib/dma.c
parent2455a677448e0e0c17d7193bf405b734b758811b (diff)
downloadpcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.gz
pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.bz2
pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.xz
pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.zip
Support for 64-bit registes
Diffstat (limited to 'pcilib/dma.c')
-rw-r--r--pcilib/dma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pcilib/dma.c b/pcilib/dma.c
index be02c21..6191047 100644
--- a/pcilib/dma.c
+++ b/pcilib/dma.c
@@ -17,6 +17,8 @@
#include "pcilib.h"
#include "pci.h"
#include "dma.h"
+#include "tools.h"
+#include "pagecpy.h"
const pcilib_dma_description_t *pcilib_get_dma_description(pcilib_t *ctx) {
int err;
@@ -194,8 +196,8 @@ static int pcilib_dma_read_callback(void *arg, pcilib_dma_flags_t flags, size_t
pcilib_error("Buffer size (%li) is not large enough for DMA packet, at least %li bytes is required", ctx->size, ctx->pos + bufsize);
return -PCILIB_ERROR_TOOBIG;
}
-
- memcpy(ctx->data + ctx->pos, buf, bufsize);
+
+ pcilib_pagecpy(ctx->data + ctx->pos, buf, bufsize);
ctx->pos += bufsize;
if (flags & PCILIB_DMA_FLAG_EOP) {