summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPritha Ghoshal <pritha9987@tamu.edu>2012-05-10 18:04:26 -0500
committerPritha Ghoshal <pritha9987@tamu.edu>2012-05-10 18:04:26 -0500
commitdc456d8166fce16c3af26f09405b0bf91ff1e38f (patch)
tree29ddc15e60fa3986052bf66162c2abf850acf452
parent4a644767c58754339965cecc5d85853255652a30 (diff)
downloadgem5-dc456d8166fce16c3af26f09405b0bf91ff1e38f.tar.xz
IGbE: Fix writeback conditions for i8254x GbE in updated data sheet.
An older revision of the data sheet specified that txdctl.gran was 1 the granularity was based on cache block and gran being 0 is based on descriptor count. The newer version of the data sheet reverses this errata
-rw-r--r--src/dev/i8254xGBe.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/i8254xGBe.cc b/src/dev/i8254xGBe.cc
index effc2a589..29bd5adc2 100644
--- a/src/dev/i8254xGBe.cc
+++ b/src/dev/i8254xGBe.cc
@@ -1923,12 +1923,12 @@ IGbE::TxDescCache::pktComplete()
igbe->anBegin("TXS", "Desc Writeback");
DPRINTF(EthernetDesc, "WTHRESH == 0, writing back descriptor\n");
writeback(0);
- } else if (igbe->regs.txdctl.gran() && igbe->regs.txdctl.wthresh() >=
+ } else if (!igbe->regs.txdctl.gran() && igbe->regs.txdctl.wthresh() <=
descInBlock(usedCache.size())) {
DPRINTF(EthernetDesc, "used > WTHRESH, writing back descriptor\n");
igbe->anBegin("TXS", "Desc Writeback");
writeback((igbe->cacheBlockSize()-1)>>4);
- } else if (igbe->regs.txdctl.wthresh() >= usedCache.size()) {
+ } else if (igbe->regs.txdctl.wthresh() <= usedCache.size()) {
DPRINTF(EthernetDesc, "used > WTHRESH, writing back descriptor\n");
igbe->anBegin("TXS", "Desc Writeback");
writeback((igbe->cacheBlockSize()-1)>>4);