Skip to content

Commit

Permalink
[crorc] Further fortify link assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
kostorr committed Oct 21, 2020
1 parent 9c25c52 commit 18d8689
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/Crorc/CrorcBar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ void CrorcBar::assertLinkUp()
}
}

std::this_thread::sleep_for(500ms);
if (!checkLinkUp()) {
BOOST_THROW_EXCEPTION(CrorcCheckLinkException() << ErrorInfo::Message("Link was not up"));
}
Expand Down
12 changes: 7 additions & 5 deletions src/Crorc/CrorcDmaChannel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ CrorcDmaChannel::CrorcDmaChannel(const Parameters& parameters)

getReadyFifoUser()->reset();
mDmaBufferUserspace = getBufferProvider().getAddress();

if (mDataSource == DataSource::Fee || mDataSource == DataSource::Siu) {
deviceResetChannel(ResetLevel::InternalSiu);
} else {
deviceResetChannel(ResetLevel::Internal);
}
}

auto CrorcDmaChannel::allowedChannels() -> AllowedChannels
Expand All @@ -106,11 +112,7 @@ CrorcDmaChannel::~CrorcDmaChannel()

void CrorcDmaChannel::deviceStartDma()
{
if (mDataSource == DataSource::Fee || mDataSource == DataSource::Siu) {
deviceResetChannel(ResetLevel::InternalSiu);
} else {
deviceResetChannel(ResetLevel::Internal);
}
deviceResetChannel(ResetLevel::Internal);

startDataReceiving();

Expand Down

0 comments on commit 18d8689

Please sign in to comment.