diff options
Diffstat (limited to 'src/dev/net/i8254xGBe.hh')
-rw-r--r-- | src/dev/net/i8254xGBe.hh | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/src/dev/net/i8254xGBe.hh b/src/dev/net/i8254xGBe.hh index 80e2104a0..402e61d95 100644 --- a/src/dev/net/i8254xGBe.hh +++ b/src/dev/net/i8254xGBe.hh @@ -98,8 +98,7 @@ class IGbE : public EtherDevice postInterrupt(iGbReg::IT_RXT); } - //friend class EventWrapper<IGbE, &IGbE::rdtrProcess>; - EventWrapper<IGbE, &IGbE::rdtrProcess> rdtrEvent; + EventFunctionWrapper rdtrEvent; // Event and function to deal with RADV timer expiring void radvProcess() { @@ -109,8 +108,7 @@ class IGbE : public EtherDevice postInterrupt(iGbReg::IT_RXT); } - //friend class EventWrapper<IGbE, &IGbE::radvProcess>; - EventWrapper<IGbE, &IGbE::radvProcess> radvEvent; + EventFunctionWrapper radvEvent; // Event and function to deal with TADV timer expiring void tadvProcess() { @@ -120,8 +118,7 @@ class IGbE : public EtherDevice postInterrupt(iGbReg::IT_TXDW); } - //friend class EventWrapper<IGbE, &IGbE::tadvProcess>; - EventWrapper<IGbE, &IGbE::tadvProcess> tadvEvent; + EventFunctionWrapper tadvEvent; // Event and function to deal with TIDV timer expiring void tidvProcess() { @@ -130,13 +127,11 @@ class IGbE : public EtherDevice "Posting TXDW interrupt because TIDV timer expired\n"); postInterrupt(iGbReg::IT_TXDW); } - //friend class EventWrapper<IGbE, &IGbE::tidvProcess>; - EventWrapper<IGbE, &IGbE::tidvProcess> tidvEvent; + EventFunctionWrapper tidvEvent; // Main event to tick the device void tick(); - //friend class EventWrapper<IGbE, &IGbE::tick>; - EventWrapper<IGbE, &IGbE::tick> tickEvent; + EventFunctionWrapper tickEvent; uint64_t macAddr; @@ -162,7 +157,7 @@ class IGbE : public EtherDevice void delayIntEvent(); void cpuPostInt(); // Event to moderate interrupts - EventWrapper<IGbE, &IGbE::delayIntEvent> interEvent; + EventFunctionWrapper interEvent; /** Clear the interupt line to the cpu */ @@ -284,24 +279,24 @@ class IGbE : public EtherDevice void writeback(Addr aMask); void writeback1(); - EventWrapper<DescCache, &DescCache::writeback1> wbDelayEvent; + EventFunctionWrapper wbDelayEvent; /** Fetch a chunk of descriptors into the descriptor cache. * Calls fetchComplete when the memory system returns the data */ void fetchDescriptors(); void fetchDescriptors1(); - EventWrapper<DescCache, &DescCache::fetchDescriptors1> fetchDelayEvent; + EventFunctionWrapper fetchDelayEvent; /** Called by event when dma to read descriptors is completed */ void fetchComplete(); - EventWrapper<DescCache, &DescCache::fetchComplete> fetchEvent; + EventFunctionWrapper fetchEvent; /** Called by event when dma to writeback descriptors is completed */ void wbComplete(); - EventWrapper<DescCache, &DescCache::wbComplete> wbEvent; + EventFunctionWrapper wbEvent; /* Return the number of descriptors left in the ring, so the device has * a way to figure out if it needs to interrupt. @@ -384,13 +379,13 @@ class IGbE : public EtherDevice */ bool packetDone(); - EventWrapper<RxDescCache, &RxDescCache::pktComplete> pktEvent; + EventFunctionWrapper pktEvent; // Event to handle issuing header and data write at the same time // and only callking pktComplete() when both are completed void pktSplitDone(); - EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> pktHdrEvent; - EventWrapper<RxDescCache, &RxDescCache::pktSplitDone> pktDataEvent; + EventFunctionWrapper pktHdrEvent; + EventFunctionWrapper pktDataEvent; bool hasOutstandingEvents() override; @@ -484,10 +479,10 @@ class IGbE : public EtherDevice /** Called by event when dma to write packet is completed */ void pktComplete(); - EventWrapper<TxDescCache, &TxDescCache::pktComplete> pktEvent; + EventFunctionWrapper pktEvent; void headerComplete(); - EventWrapper<TxDescCache, &TxDescCache::headerComplete> headerEvent; + EventFunctionWrapper headerEvent; void completionWriteback(Addr a, bool enabled) { @@ -503,7 +498,7 @@ class IGbE : public EtherDevice void nullCallback() { DPRINTF(EthernetDesc, "Completion writeback complete\n"); } - EventWrapper<TxDescCache, &TxDescCache::nullCallback> nullEvent; + EventFunctionWrapper nullEvent; void serialize(CheckpointOut &cp) const override; void unserialize(CheckpointIn &cp) override; |