@@ -159,9 +159,6 @@ void CruDmaChannel::setBufferNonReady()
159159
160160void CruDmaChannel::deviceStopDma ()
161161{
162- // Block further pushes; transfer queue has no available place anymore
163- mLinkQueuesTotalAvailable = 0 ;
164-
165162 // Disable data taking
166163 setBufferNonReady ();
167164 getBar2 ()->disableDataTaking ();
@@ -178,7 +175,7 @@ void CruDmaChannel::deviceStopDma()
178175 }
179176
180177 if (!link.queue .empty ()) {
181- transferSuperpageFromLinkToReady (link, true );
178+ transferSuperpageFromLinkToReady (link);
182179 moved++;
183180 }
184181 amountAvailable--;
@@ -189,7 +186,7 @@ void CruDmaChannel::deviceStopDma()
189186 for (auto & link : mLinks ) {
190187 while (!link.queue .empty ()) {
191188 link.queue .front ().setReceived (0 );
192- link.queue .front ().setReady (true );
189+ link.queue .front ().setReady (false );
193190 mReadyQueue .push_back (link.queue .front ());
194191 link.queue .pop_front ();
195192 }
@@ -295,7 +292,7 @@ void CruDmaChannel::pushSuperpageToLink(Link& link, const Superpage& superpage)
295292 link.queue .push_back (superpage);
296293}
297294
298- void CruDmaChannel::transferSuperpageFromLinkToReady (Link& link, bool stopping )
295+ void CruDmaChannel::transferSuperpageFromLinkToReady (Link& link)
299296{
300297 if (link.queue .empty ()) {
301298 BOOST_THROW_EXCEPTION (Exception () << ErrorInfo::Message (" Could not transfer Superpage from link to ready queue, link queue is empty" ));
@@ -313,9 +310,7 @@ void CruDmaChannel::transferSuperpageFromLinkToReady(Link& link, bool stopping)
313310 mReadyQueue .push_back (link.queue .front ());
314311 link.queue .pop_front ();
315312 link.superpageCounter ++;
316- if (!stopping) {
317- mLinkQueuesTotalAvailable ++;
318- }
313+ mLinkQueuesTotalAvailable ++;
319314}
320315
321316void CruDmaChannel::fillSuperpages ()
0 commit comments