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/pci/if_nxe.c | |
parent | fa977d1430aef60feb0d5aa71b3610a2ad13ba3e (diff) |
BUS_DMA_ZERO instead of alloc, map, bzero.
ok krw@
Diffstat (limited to 'sys/dev/pci/if_nxe.c')
-rw-r--r-- | sys/dev/pci/if_nxe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c index 79662b324db..e7d24cce0da 100644 --- a/sys/dev/pci/if_nxe.c +++ b/sys/dev/pci/if_nxe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nxe.c,v 1.60 2009/06/02 12:33:42 reyk Exp $ */ +/* $OpenBSD: if_nxe.c,v 1.61 2010/05/19 15:27:35 oga Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -2001,7 +2001,7 @@ nxe_dmamem_alloc(struct nxe_softc *sc, bus_size_t size, bus_size_t align) goto ndmfree; if (bus_dmamem_alloc(sc->sc_dmat, size, align, 0, &ndm->ndm_seg, 1, - &nsegs, BUS_DMA_WAITOK) != 0) + &nsegs, BUS_DMA_WAITOK |BUS_DMA_ZERO) != 0) goto destroy; if (bus_dmamem_map(sc->sc_dmat, &ndm->ndm_seg, nsegs, size, @@ -2012,8 +2012,6 @@ nxe_dmamem_alloc(struct nxe_softc *sc, bus_size_t size, bus_size_t align) NULL, BUS_DMA_WAITOK) != 0) goto unmap; - bzero(ndm->ndm_kva, size); - return (ndm); unmap: |