summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-07-18 14:42:48 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-07-18 14:42:48 +0000
commitb8561e9342ab4e4f133cb495a11c139550fa3303 (patch)
tree4b2894aec2046e2aa3b8961d10e39e95fb718aaf /sys/dev
parentf9d0b8cbd0dbc6e5e9a601d25dda900f8dc456fd (diff)
Remove redundant code for setting the maximum frame receive size
and fix the appropriate code in gem_init_regs(). From Brad, tested by Brad (sparc64), todd@ (macppc).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/gem.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 93ae0db062d..4e77d1ce839 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.91 2009/07/18 12:56:16 sthen Exp $ */
+/* $OpenBSD: gem.c,v 1.92 2009/07/18 14:42:47 sthen Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -700,7 +700,6 @@ gem_init(struct ifnet *ifp)
bus_space_tag_t t = sc->sc_bustag;
bus_space_handle_t h = sc->sc_h1;
int s;
- u_int max_frame_size;
u_int32_t v;
s = splnet();
@@ -730,9 +729,6 @@ gem_init(struct ifnet *ifp)
/* step 4. TX MAC registers & counters */
gem_init_regs(sc);
- max_frame_size = ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN;
- v = (max_frame_size) | (0x2000 << 16) /* Burst size */;
- bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, v);
/* step 5. RX MAC registers & counters */
gem_iff(sc);
@@ -833,8 +829,8 @@ 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 = ETHER_MAX_LEN | (0x2000 << 16) /* Burst size */;
- bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME, v);
+ bus_space_write_4(t, h, GEM_MAC_MAC_MAX_FRAME,
+ (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN) | (0x2000 << 16));
bus_space_write_4(t, h, GEM_MAC_PREAMBLE_LEN, 0x7);
bus_space_write_4(t, h, GEM_MAC_JAM_SIZE, 0x4);