summaryrefslogtreecommitdiff
path: root/src/dev/i8254xGBe_defs.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2010-11-26 20:47:23 -0500
committerAli Saidi <saidi@eecs.umich.edu>2010-11-26 20:47:23 -0500
commit0f039fe447c9b1a6e885d8e5e794c25c10da39b9 (patch)
treee49acd25931cb3f222d68fea95802cecf5ba7970 /src/dev/i8254xGBe_defs.hh
parent7f6ca0981f11f84f68c66cb33cee603152448d29 (diff)
downloadgem5-0f039fe447c9b1a6e885d8e5e794c25c10da39b9.tar.xz
IGbE: return 0 on an invalid descriptor size instead of -1.
Asserts where descSize() get called with assert if we end up returning 0.
Diffstat (limited to 'src/dev/i8254xGBe_defs.hh')
-rw-r--r--src/dev/i8254xGBe_defs.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dev/i8254xGBe_defs.hh b/src/dev/i8254xGBe_defs.hh
index 4de347b99..c37a6dc0e 100644
--- a/src/dev/i8254xGBe_defs.hh
+++ b/src/dev/i8254xGBe_defs.hh
@@ -484,12 +484,12 @@ struct Regs {
unsigned descSize()
{
switch(bsize()) {
- case 0: return bsex() == 0 ? 2048 : -1;
+ case 0: return bsex() == 0 ? 2048 : 0;
case 1: return bsex() == 0 ? 1024 : 16384;
case 2: return bsex() == 0 ? 512 : 8192;
case 3: return bsex() == 0 ? 256 : 4096;
default:
- return -1;
+ return 0;
}
}
};