diff options
-rw-r--r-- | host/lib/transport/nirio/niusrprio_session.cpp | 2 | ||||
-rw-r--r-- | host/lib/transport/nirio_zero_copy.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/transport/nirio/niusrprio_session.cpp b/host/lib/transport/nirio/niusrprio_session.cpp index 3afe61eae..97d764736 100644 --- a/host/lib/transport/nirio/niusrprio_session.cpp +++ b/host/lib/transport/nirio/niusrprio_session.cpp @@ -214,7 +214,7 @@ nirio_status niusrprio_session::_ensure_fpga_ready() boost::uint32_t reg_data = 0xffffffff; nirio_status_chain(_riok_proxy.peek(FPGA_STATUS_REG, reg_data), status); - if (reg_data & FPGA_STATUS_DMA_ACTIVE_MASK) + if (nirio_status_not_fatal(status) && (reg_data & FPGA_STATUS_DMA_ACTIVE_MASK)) { //In case this session was re-initialized *immediately* after the previous //there is a small chance that the server is still finishing up cleaning up diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp index a739c01f1..3bb822720 100644 --- a/host/lib/transport/nirio_zero_copy.cpp +++ b/host/lib/transport/nirio_zero_copy.cpp @@ -304,7 +304,7 @@ private: PCIE_RX_DMA_REG(DMA_CTRL_STATUS_REG, _fifo_instance), reg_data), status); rx_busy = (reg_data & DMA_STATUS_BUSY); - if (nirio_status_not_fatal(status) && !tx_busy && !rx_busy) { + if (nirio_status_not_fatal(status) && (tx_busy || rx_busy)) { start_time = boost::posix_time::microsec_clock::local_time(); do { boost::this_thread::sleep(boost::posix_time::microsec(50)); //Avoid flooding the bus |