IGbE: Fix two e1000 driver bugs that I missed before.
authorAli Saidi <saidi@eecs.umich.edu>
Fri, 23 Jan 2009 22:19:47 +0000 (17:19 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Fri, 23 Jan 2009 22:19:47 +0000 (17:19 -0500)
src/dev/i8254xGBe.cc

index cf6692fb4dbd13ded97db919cfad8f7bbc4adf17..d6a888b216fa9495bead2d4c3b9745cf4cf69f85 100644 (file)
@@ -1108,6 +1108,7 @@ IGbE::RxDescCache::unserialize(Checkpoint *cp, const std::string &section)
 
 IGbE::TxDescCache::TxDescCache(IGbE *i, const std::string n, int s)
     : DescCache<TxDesc>(i,n, s), pktDone(false), isTcp(false), pktWaiting(false),
+       completionAddress(0), completionEnabled(false),
        useTso(false), pktEvent(this), headerEvent(this), nullEvent(this)
 
 {
@@ -1319,7 +1320,8 @@ IGbE::TxDescCache::pktComplete()
 
 
     if ((!TxdOp::eop(desc) && !useTso) || 
-            (pktPtr->length < ( tsoMss + tsoHeaderLen) && tsoTotalLen != tsoUsedLen)) {
+            (pktPtr->length < ( tsoMss + tsoHeaderLen) &&
+             tsoTotalLen != tsoUsedLen && useTso)) {
         assert(!useTso || (tsoDescBytesUsed == TxdOp::getLen(desc)));
         unusedCache.pop_front();
         usedCache.push_back(desc);