diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-22 12:33:31 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-22 12:33:31 +0000 |
commit | 128e41930a379b9a347caf237750e1aaa787fb48 (patch) | |
tree | da665ec894c9312eeabad6df45b99686288b909e /sys/dev/ic/mpi.c | |
parent | 3c9e1eeaf9949d59aa71092dbe240ddd697698af (diff) |
use BUS_DMA_ZERO on alloc instead of bzeroing after.
ok dlg@, marco@
Diffstat (limited to 'sys/dev/ic/mpi.c')
-rw-r--r-- | sys/dev/ic/mpi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index fbb4955d91f..fbd974b474a 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.144 2010/04/22 03:14:35 marco Exp $ */ +/* $OpenBSD: mpi.c,v 1.145 2010/04/22 12:33:30 oga Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -904,7 +904,7 @@ mpi_dmamem_alloc(struct mpi_softc *sc, size_t size) goto mdmfree; if (bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &mdm->mdm_seg, - 1, &nsegs, BUS_DMA_NOWAIT) != 0) + 1, &nsegs, BUS_DMA_NOWAIT | BUS_DMA_ZERO) != 0) goto destroy; if (bus_dmamem_map(sc->sc_dmat, &mdm->mdm_seg, nsegs, size, @@ -915,8 +915,6 @@ mpi_dmamem_alloc(struct mpi_softc *sc, size_t size) NULL, BUS_DMA_NOWAIT) != 0) goto unmap; - bzero(mdm->mdm_kva, size); - DNPRINTF(MPI_D_MEM, "%s: mpi_dmamem_alloc size: %d mdm: %#x " "map: %#x nsegs: %d segs: %#x kva: %x\n", DEVNAME(sc), size, mdm->mdm_map, nsegs, mdm->mdm_seg, mdm->mdm_kva); |