summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2003-01-27 19:09:13 +0000
committerJason Wright <jason@cvs.openbsd.org>2003-01-27 19:09:13 +0000
commit4cf378f023ea5237dcdca49108e5e730467caa1a (patch)
tree7b738c8721649a072de6a9cc2124d9bd9e77fb7d /sys/dev/isa
parentb1c5c9d462a33e9370f91876cef48752b656d085 (diff)
Pad tx buffer with 0's on minimum sized frames; based on NetBSD.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/if_eg.c4
-rw-r--r--sys/dev/isa/if_el.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index bcdee011c6c..41699483bc7 100644
--- a/sys/dev/isa/if_eg.c
+++ b/sys/dev/isa/if_eg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eg.c,v 1.23 2002/03/14 03:16:05 millert Exp $ */
+/* $OpenBSD: if_eg.c,v 1.24 2003/01/27 19:09:12 jason Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
@@ -581,6 +581,8 @@ loop:
bcopy(mtod(m, caddr_t), buffer, m->m_len);
buffer += m->m_len;
}
+ if (len > m0->m_pkthdr.len)
+ bzero(buffer, len - m0->m_pkthdr.len);
/* set direction bit: host -> adapter */
bus_space_write_1(bst, bsh, EG_CONTROL,
diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c
index e12ba02a476..2a0ee1688c1 100644
--- a/sys/dev/isa/if_el.c
+++ b/sys/dev/isa/if_el.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_el.c,v 1.17 2002/03/14 01:26:56 millert Exp $ */
+/* $OpenBSD: if_el.c,v 1.18 2003/01/27 19:09:12 jason Exp $ */
/* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */
/*
@@ -342,7 +342,10 @@ elstart(ifp)
/* Copy the datagram to the buffer. */
for (m = m0; m != 0; m = m->m_next)
outsb(iobase+EL_BUF, mtod(m, caddr_t), m->m_len);
-
+ for (i = 0;
+ i < ETHER_MIN_LEN - ETHER_CRC_LEN - m0->m_pkthdr.len; i++)
+ outb(iobase+EL_BUF, 0);
+
m_freem(m0);
/* Now transmit the datagram. */