mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
make memory manager destroy IP objects and improve DMA logging
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
47379f0374
commit
f5b0762b1a
3 changed files with 8 additions and 7 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 51e32a4b9164b176da5ba3843b645ad6b49b3ec2
|
||||
Subproject commit 31b9f1dcf034b1747b66ac9d107d244108ede71f
|
|
@ -167,6 +167,9 @@ std::list<std::shared_ptr<PCIeCard>> PCIeCardFactory::make(json_t *json, std::sh
|
|||
|
||||
PCIeCard::~PCIeCard()
|
||||
{
|
||||
// Ensure IP destructors are called before memory is unmapped
|
||||
ips.clear();
|
||||
|
||||
auto &mm = MemoryManager::get();
|
||||
|
||||
// Unmap all memory blocks
|
||||
|
|
|
@ -191,16 +191,14 @@ bool Dma::reset()
|
|||
int timeout = 500;
|
||||
|
||||
while (timeout > 0) {
|
||||
if (XAxiDma_ResetIsDone(&xDma))
|
||||
if (XAxiDma_ResetIsDone(&xDma)) {
|
||||
logger->info("DMA has been reset.");
|
||||
return true;
|
||||
}
|
||||
|
||||
timeout--;
|
||||
}
|
||||
if (timeout == 0) {
|
||||
logger->error("DMA reset timed out");
|
||||
} else {
|
||||
logger->info("DMA has been reset.");
|
||||
}
|
||||
logger->error("DMA reset timed out");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue