From b646194911cd70e91e84c8354d5bac35b27156df Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 19 Jul 2011 17:59:25 +0200 Subject: Few fixes for IPE Camera modification --- cli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli.c') diff --git a/cli.c b/cli.c index c5df898..cdbf9be 100644 --- a/cli.c +++ b/cli.c @@ -782,7 +782,9 @@ int WriteData(pcilib_t *handle, ACCESS_MODE mode, pcilib_dma_engine_addr_t dma, if (dmaid == PCILIB_DMA_ENGINE_INVALID) Error("Invalid DMA engine (%lu) is specified", dma); err = pcilib_write_dma(handle, dmaid, addr, size, buf, &ret); if ((err)||(ret != size)) { - if (!ret) Error("No data is written by DMA engine"); + if (err == PCILIB_ERROR_TIMEOUT) Error("Timeout writting the data to DMA"); + else if (err) Error("DMA engine returned a error while writing the data"); + else if (!ret) Error("No data is written by DMA engine"); else Error("Only %lu bytes of %lu is written by DMA engine", ret, size); } break; -- cgit v1.2.3