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/mtd8xx.c | |
parent | fa977d1430aef60feb0d5aa71b3610a2ad13ba3e (diff) |
BUS_DMA_ZERO instead of alloc, map, bzero.
ok krw@
Diffstat (limited to 'sys/dev/ic/mtd8xx.c')
-rw-r--r-- | sys/dev/ic/mtd8xx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c index f3c08baeecc..2d689ae4c98 100644 --- a/sys/dev/ic/mtd8xx.c +++ b/sys/dev/ic/mtd8xx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtd8xx.c,v 1.16 2008/11/28 02:44:17 brad Exp $ */ +/* $OpenBSD: mtd8xx.c,v 1.17 2010/05/19 15:27:35 oga Exp $ */ /* * Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru> @@ -99,7 +99,7 @@ mtd_attach(struct mtd_softc *sc) if (bus_dmamem_alloc(sc->sc_dmat, sizeof(struct mtd_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; } @@ -121,7 +121,6 @@ mtd_attach(struct mtd_softc *sc) return; } sc->mtd_ldata = (struct mtd_list_data *)sc->sc_listkva; - bzero(sc->mtd_ldata, sizeof(struct mtd_list_data)); for (i = 0; i < MTD_RX_LIST_CNT; i++) { if (bus_dmamap_create(sc->sc_dmat, MCLBYTES, 1, MCLBYTES, |