summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-03-12 19:11:03 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-03-12 19:11:03 +0000
commit16be3156cf15078602334778c38601cbf5d80ce8 (patch)
treec6addcc299379b9b7ed9ebe1e1934c5933f590fe /sys
parent45c49256c551f079986ed9e840de45a3b9bf23e9 (diff)
backout the two previous patches, it breaks the 3com ae card and I don't
understand it enough to fix.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mac68k/dev/if_ae.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c
index 79d72a2b491..6cf639e4821 100644
--- a/sys/arch/mac68k/dev/if_ae.c
+++ b/sys/arch/mac68k/dev/if_ae.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ae.c,v 1.20 2003/01/28 04:15:38 jason Exp $ */
+/* $OpenBSD: if_ae.c,v 1.21 2003/03/12 19:11:02 jason Exp $ */
/* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */
/*
@@ -425,8 +425,15 @@ outloop:
buffer = (sc->txb_new * ED_TXBUF_SIZE) << ED_PAGE_SHIFT;
len = ae_put(sc, m0, buffer);
+#if DIAGNOSTIC
+ if (len != m0->m_pkthdr.len)
+ printf("aestart: len %d != m0->m_pkthdr.len %d.\n",
+ len, m0->m_pkthdr.len);
+#endif
+ len = m0->m_pkthdr.len;
+
m_freem(m0);
- sc->txb_len[sc->txb_new] = len;
+ sc->txb_len[sc->txb_new] = max(len, ETHER_MIN_LEN);
/* Start the first packet transmitting. */
if (sc->txb_inuse == 0)
@@ -1072,13 +1079,6 @@ ae_put(sc, m, buf)
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, savebyte, 1);
- buf += 2;
}
- if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
- bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
- totlen = ETHERMIN - ETHER_CRC_LEN;
- }
-
return (totlen);
}