dev: Fix OnIdle test in DmaReadFifo
authorRohit Kurup <rohit.kurup@arm.com>
Tue, 27 Jun 2017 09:37:46 +0000 (10:37 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 10 Jul 2017 08:31:10 +0000 (08:31 +0000)
OnIdle() is never called since DMA active check is completely
opposite to what it should be. old active status should be 'true'
and new active status should be false for OnIdle to be called

Change-Id: I94eca50edbe96113190837c7f6e50a0d061158a6
Reported-by: Rohit Kurup <rohit.kurup@arm.com>
Signed-off-by: Rohit Kurup <rohit.kurup@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/3966
Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com>
src/dev/dma_device.cc

index a78819a3e1870a45fce3133c5936dbd228079ab3..f6f751c05edb1bb03b7552f95e57b1adebd05aff 100644 (file)
@@ -438,7 +438,7 @@ DmaReadFifo::dmaDone()
     handlePending();
     resumeFill();
 
-    if (!old_active && isActive())
+    if (old_active && !isActive())
         onIdle();
 }