-/* $OpenBSD: if_sis.c,v 1.77 2007/05/04 12:12:53 art Exp $ */
+/* $OpenBSD: if_sis.c,v 1.78 2008/07/07 12:53:43 thib Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
m_new->m_data = m_new->m_ext.ext_buf;
}
- if (bus_dmamap_load(sc->sc_dmat, sc->sc_rx_sparemap,
- mtod(m_new, caddr_t), MCLBYTES, NULL, BUS_DMA_NOWAIT) != 0) {
- printf("%s: rx load failed\n", sc->sc_dev.dv_xname);
+ if (bus_dmamap_load_mbuf(sc->sc_dmat, sc->sc_rx_sparemap, m_new,
+ BUS_DMA_NOWAIT)) {
m_freem(m_new);
return (ENOBUFS);
}
+
map = c->map;
c->map = sc->sc_rx_sparemap;
sc->sc_rx_sparemap = map;