summaryrefslogtreecommitdiff
path: root/sys/dev/ic/fxp.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-05-19 15:27:36 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-05-19 15:27:36 +0000
commit158d178f03df6b6e0f7f96e4596904b0ab8274bb (patch)
tree592e86ac7a4fefc86456a1838bc06aab1a0602ed /sys/dev/ic/fxp.c
parentfa977d1430aef60feb0d5aa71b3610a2ad13ba3e (diff)
BUS_DMA_ZERO instead of alloc, map, bzero.
ok krw@
Diffstat (limited to 'sys/dev/ic/fxp.c')
-rw-r--r--sys/dev/ic/fxp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 6d511b4adbe..1ebf6772268 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.100 2009/10/15 17:54:54 deraadt Exp $ */
+/* $OpenBSD: fxp.c,v 1.101 2010/05/19 15:27:35 oga Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -338,7 +338,8 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr)
DELAY(10);
if (bus_dmamem_alloc(sc->sc_dmat, sizeof(struct fxp_ctrl),
- PAGE_SIZE, 0, &sc->sc_cb_seg, 1, &sc->sc_cb_nseg, BUS_DMA_NOWAIT))
+ PAGE_SIZE, 0, &sc->sc_cb_seg, 1, &sc->sc_cb_nseg,
+ BUS_DMA_NOWAIT | BUS_DMA_ZERO))
goto fail;
if (bus_dmamem_map(sc->sc_dmat, &sc->sc_cb_seg, sc->sc_cb_nseg,
sizeof(struct fxp_ctrl), (caddr_t *)&sc->sc_ctrl,
@@ -375,7 +376,6 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr)
sc->txs[i].tx_off = offsetof(struct fxp_ctrl, tx_cb[i]);
sc->txs[i].tx_next = &sc->txs[(i + 1) & FXP_TXCB_MASK];
}
- bzero(sc->sc_ctrl, sizeof(struct fxp_ctrl));
/*
* Pre-allocate some receive buffers.