summaryrefslogtreecommitdiff
path: root/sys/dev/ic/gem.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-09-23 20:03:02 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-09-23 20:03:02 +0000
commit50acd538c77a8bcf4826ddbc719a0c02cc1ba5fb (patch)
tree96f84340e75254461a25c283f5083028ae059475 /sys/dev/ic/gem.c
parent4383da9eebccf2a26aa760442925195663331d96 (diff)
solve mtu problem a little more elegantly (ramdisk works on blade100 and
u5 now).
Diffstat (limited to 'sys/dev/ic/gem.c')
-rw-r--r--sys/dev/ic/gem.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 1291126b92f..a487bc5ed59 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -748,12 +748,8 @@ if (gem_opdebug) printf("in init\n");
/* step 4. TX MAC registers & counters */
gem_init_regs(sc);
- v = ETHERMTU + sizeof(struct ether_header) + 50 +
-#if NVLAN > 0
- EVL_ENCAPLEN +
-#endif
- 0;
- bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, (v) | (0x2000<<16));
+ v = (GEM_MTU) | (0x2000 << 16) /* Burst size */;
+ bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, v);
/* step 5. RX MAC registers & counters */
gem_setladrf(sc);
@@ -891,11 +887,7 @@ gem_init_regs(struct gem_softc *sc)
bus_space_write_4(t, h, GEM_MAC_MAC_MIN_FRAME, ETHER_MIN_LEN);
/* Max frame and max burst size */
- v = ((ETHERMTU + sizeof(struct ether_header) + 50 +
-#if NVLAN > 0
- EVL_ENCAPLEN +
-#endif
- 0) | (0x2000<<16) /* Burst size */);
+ v = (GEM_MTU) | (0x2000 << 16) /* Burst size */;
bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, v);
bus_space_write_4(t, h, GEM_MAC_PREAMBLE_LEN, 0x7);
bus_space_write_4(t, h, GEM_MAC_JAM_SIZE, 0x4);