-/* $OpenBSD: if_sis.c,v 1.78 2008/07/07 12:53:43 thib Exp $ */
+/* $OpenBSD: if_sis.c,v 1.79 2008/07/10 18:14:59 thib Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
m_freem(m_new);
return (ENOBUFS);
}
- m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
} else {
m_new = m;
- m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
m_new->m_data = m_new->m_ext.ext_buf;
}
+ m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
+
+ m_adj(m_new, sizeof(u_int64_t));
+
if (bus_dmamap_load_mbuf(sc->sc_dmat, sc->sc_rx_sparemap, m_new,
BUS_DMA_NOWAIT)) {
m_freem(m_new);
bus_dmamap_sync(sc->sc_dmat, c->map, 0, c->map->dm_mapsize,
BUS_DMASYNC_PREREAD);
- m_adj(m_new, sizeof(u_int64_t));
-
c->sis_mbuf = m_new;
- c->sis_ptr = c->map->dm_segs[0].ds_addr + sizeof(u_int64_t);
+ c->sis_ptr = c->map->dm_segs[0].ds_addr;
c->sis_ctl = ETHER_MAX_DIX_LEN;
bus_dmamap_sync(sc->sc_dmat, sc->sc_listmap,