diff options
author | 2008-07-07 12:53:43 +0000 | |
---|---|---|
committer | 2008-07-07 12:53:43 +0000 | |
commit | 63bef9edfac0c7f0cdbfb135d6f79f18b033f2aa (patch) | |
tree | 60589f0578386440121c6c07d8f2904b3ff94dd0 | |
parent | Shorten the sensor description and reserve room for optional characters (diff) | |
download | wireguard-openbsd-63bef9edfac0c7f0cdbfb135d6f79f18b033f2aa.tar.xz wireguard-openbsd-63bef9edfac0c7f0cdbfb135d6f79f18b033f2aa.zip |
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@
-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; |