summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rtl81x9.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/rtl81x9.c
parentfa977d1430aef60feb0d5aa71b3610a2ad13ba3e (diff)
BUS_DMA_ZERO instead of alloc, map, bzero.
ok krw@
Diffstat (limited to 'sys/dev/ic/rtl81x9.c')
-rw-r--r--sys/dev/ic/rtl81x9.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index 071e99c24a2..5f636c712aa 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.69 2009/12/21 18:14:51 naddy Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.70 2010/05/19 15:27:35 oga Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1162,7 +1162,7 @@ rl_attach(struct rl_softc *sc)
sc->rl_type = RL_UNKNOWN; /* could be 8138 or other */
if (bus_dmamem_alloc(sc->sc_dmat, RL_RXBUFLEN + 32, PAGE_SIZE, 0,
- &sc->sc_rx_seg, 1, &rseg, BUS_DMA_NOWAIT)) {
+ &sc->sc_rx_seg, 1, &rseg, BUS_DMA_NOWAIT | BUS_DMA_ZERO)) {
printf("\n%s: can't alloc rx buffers\n", sc->sc_dev.dv_xname);
return (1);
}
@@ -1191,8 +1191,6 @@ rl_attach(struct rl_softc *sc)
sc->rl_cdata.rl_rx_buf = kva;
sc->rl_cdata.rl_rx_buf_pa = sc->sc_rx_dmamap->dm_segs[0].ds_addr;
- bzero(sc->rl_cdata.rl_rx_buf, RL_RXBUFLEN + 32);
-
bus_dmamap_sync(sc->sc_dmat, sc->sc_rx_dmamap,
0, sc->sc_rx_dmamap->dm_mapsize, BUS_DMASYNC_PREREAD);