diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-05-19 15:27:36 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-05-19 15:27:36 +0000 |
commit | 158d178f03df6b6e0f7f96e4596904b0ab8274bb (patch) | |
tree | 592e86ac7a4fefc86456a1838bc06aab1a0602ed /sys/dev/ic/xl.c | |
parent | fa977d1430aef60feb0d5aa71b3610a2ad13ba3e (diff) |
BUS_DMA_ZERO instead of alloc, map, bzero.
ok krw@
Diffstat (limited to 'sys/dev/ic/xl.c')
-rw-r--r-- | sys/dev/ic/xl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 478166ee6a0..64f41ee9268 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.88 2009/12/22 21:10:25 naddy Exp $ */ +/* $OpenBSD: xl.c,v 1.89 2010/05/19 15:27:35 oga Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2427,7 +2427,7 @@ xl_attach(struct xl_softc *sc) if (bus_dmamem_alloc(sc->sc_dmat, sizeof(struct xl_list_data), PAGE_SIZE, 0, sc->sc_listseg, 1, &sc->sc_listnseg, - BUS_DMA_NOWAIT) != 0) { + BUS_DMA_NOWAIT | BUS_DMA_ZERO) != 0) { printf(": can't alloc list mem\n"); return; } @@ -2449,7 +2449,6 @@ xl_attach(struct xl_softc *sc) return; } sc->xl_ldata = (struct xl_list_data *)sc->sc_listkva; - bzero(sc->xl_ldata, sizeof(struct xl_list_data)); for (i = 0; i < XL_RX_LIST_CNT; i++) { if (bus_dmamap_create(sc->sc_dmat, MCLBYTES, 1, MCLBYTES, |