summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-04-30 13:18:44 -0400
committerAli Saidi <saidi@eecs.umich.edu>2007-04-30 13:18:44 -0400
commit7baf29c9d0ea2f4c6ad026d1420f25d1143a07ac (patch)
tree6edcea84e447c50937a9c12c141bb1e2ef1b869d /src
parent58b9047194774ae6ee3cd7c2ef52cc867c8e718e (diff)
downloadgem5-7baf29c9d0ea2f4c6ad026d1420f25d1143a07ac.tar.xz
fix igbe bug
--HG-- extra : convert_revision : 01ffc08f5c1ec827a42f60562ae7e10176ffdb7f
Diffstat (limited to 'src')
-rw-r--r--src/dev/i8254xGBe.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dev/i8254xGBe.cc b/src/dev/i8254xGBe.cc
index 3d08bca1e..6acd06132 100644
--- a/src/dev/i8254xGBe.cc
+++ b/src/dev/i8254xGBe.cc
@@ -710,7 +710,7 @@ IGbE::RxDescCache::pktComplete()
DPRINTF(EthernetDesc, "Checking UDP checksum\n");
status |= RXDS_UDPCS;
desc->csum = htole(cksum(udp));
- if (cksum(tcp) != 0) {
+ if (cksum(udp) != 0) {
DPRINTF(EthernetDesc, "Checksum is bad!!\n");
err |= RXDE_TCPE;
}
@@ -927,11 +927,13 @@ IGbE::TxDescCache::pktComplete()
if (TxdOp::txsm(desc)) {
if (isTcp) {
TcpPtr tcp(ip);
+ assert(tcp);
tcp->sum(0);
tcp->sum(cksum(tcp));
DPRINTF(EthernetDesc, "Calculated TCP checksum\n");
} else {
UdpPtr udp(ip);
+ assert(udp);
udp->sum(0);
udp->sum(cksum(udp));
DPRINTF(EthernetDesc, "Calculated UDP checksum\n");
@@ -1028,7 +1030,7 @@ IGbE::TxDescCache::hasOutstandingEvents()
void
IGbE::restartClock()
{
- if (!tickEvent.scheduled() && (rxTick || txTick) && getState() ==
+ if (!tickEvent.scheduled() && (rxTick || txTick || txFifoTick) && getState() ==
SimObject::Running)
tickEvent.schedule((curTick/cycles(1)) * cycles(1) + cycles(1));
}