diff options
| author | thorpej <thorpej@NetBSD.org> | 2001-06-29 23:36:03 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2001-06-29 23:36:03 +0000 |
| commit | abda6184c06405478ca227260330c9ff27662ef0 (patch) | |
| tree | 74cd52ed7e2569acd01a7d3faa7fccbdea8c652d /sys/dev | |
| parent | 134be573b3003fa76d932ffaa3cb7cd1e1f2ea41 (diff) | |
In the `copy small' path, make sure to align the payload.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/if_ste.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index be14194b988..24e299e5fbf 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ste.c,v 1.1 2001/06/19 23:00:47 thorpej Exp $ */ +/* $NetBSD: if_ste.c,v 1.2 2001/06/29 23:36:03 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -1024,10 +1024,11 @@ ste_rxintr(struct ste_softc *sc) * chain. If this fails, we drop the packet and * recycle the old buffer. */ - if (ste_copy_small != 0 && len <= MHLEN) { + if (ste_copy_small != 0 && len <= (MHLEN - 2)) { MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) goto dropit; + m->m_data += 2; memcpy(mtod(m, caddr_t), mtod(ds->ds_mbuf, caddr_t), len); STE_INIT_RXDESC(sc, i); |
