diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-07-07 12:53:44 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-07-07 12:53:44 +0000 |
commit | 35080770669bb33902874355e9388bdd2d839850 (patch) | |
tree | a76e2a3566abf34c2a031b47b05c09879c6ec0e9 /sys | |
parent | 35fde716e2bfbbb8d5033945272dacfdd10fde1f (diff) |
Use bus_dmamap_load_mbuf() instead of bus_dmamap_load() when
we want too load an mbuf; remove a printf that fires in case
we can't load the mbuf (We do error handling and recovery).
ok brad@, dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_sis.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 99230029dc9..82aac88ac85 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $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. @@ -1258,12 +1258,12 @@ sis_newbuf(struct sis_softc *sc, struct sis_desc *c, struct mbuf *m) 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; |