More subtle fixes to how interrupts are supposed to work in the device. Fix postedInt...
authorAli Saidi <saidi@eecs.umich.edu>
Wed, 13 Aug 2008 20:30:30 +0000 (16:30 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Wed, 13 Aug 2008 20:30:30 +0000 (16:30 -0400)
src/dev/i8254xGBe.cc
src/dev/i8254xGBe.hh

index 76e11b752456b83f6209ca08c64423ab9f383b35..98040a252a8a505e882870b677a182a159d704de 100644 (file)
@@ -588,7 +588,6 @@ IGbE::postInterrupt(IntTypes t, bool now)
         if (interEvent.scheduled()) {
             interEvent.deschedule();
         }
-        postedInterrupts++;
         cpuPostInt();
     } else {
        Tick int_time = lastInterrupt + itr_interval;
@@ -612,6 +611,8 @@ void
 IGbE::cpuPostInt()
 {
 
+    postedInterrupts++;
+
     if (!(regs.icr() & regs.imr)) {
         DPRINTF(Ethernet, "Interrupt Masked. Not Posting\n");
         return;
index a69793bd473d3df451d74cdfe83db29d371b1d3b..de73eda79c86481eef84d1b8d6956082472d70da 100644 (file)
@@ -87,7 +87,7 @@ class IGbE : public EtherDevice
     void rdtrProcess() {
         rxDescCache.writeback(0);
         DPRINTF(EthernetIntr, "Posting RXT interrupt because RDTR timer expired\n");
-        postInterrupt(iGbReg::IT_RXT, true);
+        postInterrupt(iGbReg::IT_RXT);
     }
 
     //friend class EventWrapper<IGbE, &IGbE::rdtrProcess>;
@@ -97,7 +97,7 @@ class IGbE : public EtherDevice
     void radvProcess() {
         rxDescCache.writeback(0);
         DPRINTF(EthernetIntr, "Posting RXT interrupt because RADV timer expired\n");
-        postInterrupt(iGbReg::IT_RXT, true);
+        postInterrupt(iGbReg::IT_RXT);
     }
 
     //friend class EventWrapper<IGbE, &IGbE::radvProcess>;
@@ -107,7 +107,7 @@ class IGbE : public EtherDevice
     void tadvProcess() {
         txDescCache.writeback(0);
         DPRINTF(EthernetIntr, "Posting TXDW interrupt because TADV timer expired\n");
-        postInterrupt(iGbReg::IT_TXDW, true);
+        postInterrupt(iGbReg::IT_TXDW);
     }
 
     //friend class EventWrapper<IGbE, &IGbE::tadvProcess>;
@@ -117,7 +117,7 @@ class IGbE : public EtherDevice
     void tidvProcess() {
         txDescCache.writeback(0);
         DPRINTF(EthernetIntr, "Posting TXDW interrupt because TIDV timer expired\n");
-        postInterrupt(iGbReg::IT_TXDW, true);
+        postInterrupt(iGbReg::IT_TXDW);
     }
     //friend class EventWrapper<IGbE, &IGbE::tidvProcess>;
     EventWrapper<IGbE, &IGbE::tidvProcess> tidvEvent;