From f4ad2df2209acac66f3df47d847f1f714283feab Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 14 Jul 2011 06:01:27 +0200 Subject: First iteration of work to preserve DMA state between executions --- pci.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pci.c') diff --git a/pci.c b/pci.c index 3846235..d2d5843 100644 --- a/pci.c +++ b/pci.c @@ -401,8 +401,12 @@ void pcilib_close(pcilib_t *ctx) { ctx->model_info.registers = pcilib_model[ctx->model].registers; } - while (ctx->kmem_list) { - pcilib_free_kernel_memory(ctx, ctx->kmem_list); + if (ctx->kmem_list) { + pcilib_warning("Not all kernel buffers are properly cleaned"); + + while (ctx->kmem_list) { + pcilib_free_kernel_memory(ctx, ctx->kmem_list, 0); + } } for (i = 0; i < PCILIB_MAX_BANKS; i++) { -- cgit v1.2.3