summaryrefslogtreecommitdiff
path: root/sys/dev/ic/mfi.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-04-22 12:33:31 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-04-22 12:33:31 +0000
commit128e41930a379b9a347caf237750e1aaa787fb48 (patch)
treeda665ec894c9312eeabad6df45b99686288b909e /sys/dev/ic/mfi.c
parent3c9e1eeaf9949d59aa71092dbe240ddd697698af (diff)
use BUS_DMA_ZERO on alloc instead of bzeroing after.
ok dlg@, marco@
Diffstat (limited to 'sys/dev/ic/mfi.c')
-rw-r--r--sys/dev/ic/mfi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index acd67bc88a0..d388097110c 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.102 2010/04/10 17:29:59 marco Exp $ */
+/* $OpenBSD: mfi.c,v 1.103 2010/04/22 12:33:30 oga Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -303,7 +303,7 @@ mfi_allocmem(struct mfi_softc *sc, size_t size)
goto amfree;
if (bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &mm->am_seg, 1,
- &nsegs, BUS_DMA_NOWAIT) != 0)
+ &nsegs, BUS_DMA_NOWAIT | BUS_DMA_ZERO) != 0)
goto destroy;
if (bus_dmamem_map(sc->sc_dmat, &mm->am_seg, nsegs, size, &mm->am_kva,
@@ -317,7 +317,6 @@ mfi_allocmem(struct mfi_softc *sc, size_t size)
DNPRINTF(MFI_D_MEM, " kva: %p dva: %p map: %p\n",
mm->am_kva, mm->am_map->dm_segs[0].ds_addr, mm->am_map);
- memset(mm->am_kva, 0, size);
return (mm);
unmap: