Do not disable DMA in destructor
The "puzzlecmd" tool needs to create multiple instances of PuzzleFwDevice, one for the data server and one for simple register commands. We don't want these instances fighting over the state of the DMA engine.
This commit is contained in:
parent
30939214df
commit
12413ba041
|
@ -160,9 +160,6 @@ puzzlefw::PuzzleFwDevice::PuzzleFwDevice()
|
|||
/* Destructor. */
|
||||
puzzlefw::PuzzleFwDevice::~PuzzleFwDevice()
|
||||
{
|
||||
// Disable DMA engine.
|
||||
set_dma_enabled(false);
|
||||
|
||||
// Unmap memory regions.
|
||||
munmap((void*)m_regs, puzzlefw::REGS_SIZE);
|
||||
munmap((void*)m_dma_buf, m_dma_buf_size);
|
||||
|
|
|
@ -108,14 +108,13 @@ struct VersionInfo {
|
|||
* This class uses the UIO driver framework and the custom PuzzleFW Linux
|
||||
* kernel driver to access the PuzzleFW firmware.
|
||||
*
|
||||
* Only a single instance of this class should exist at any time in any
|
||||
* process on the system. Creating multiple instances, even in separate
|
||||
* processes, may cause the firmware to function incorrectly.
|
||||
*
|
||||
* Methods of this class may throw exceptions to report error conditions.
|
||||
* "std::invalid_argument" is used to report invalid arguments.
|
||||
* "std::runtime_error" is used to report errors during opening of the device.
|
||||
*
|
||||
* It is generally not safe to access the firmware concurrently
|
||||
* through multiple instances of this class, even from separate processes.
|
||||
*
|
||||
* Unless stated otherwise, the methods of this class must not be called
|
||||
* concurrently from multiple threads without explicit synchronization.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue