Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Use coherent DMA mappings when possible.



details:   https://anonhg.NetBSD.org/src/rev/9113ce6ee729
branches:  trunk
changeset: 1023659:9113ce6ee729
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Sep 20 11:47:26 2021 +0000

description:
Use coherent DMA mappings when possible.

diffstat:

 sys/dev/pci/if_mcx.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a70a2442ea25 -r 9113ce6ee729 sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Mon Sep 20 11:27:30 2021 +0000
+++ b/sys/dev/pci/if_mcx.c      Mon Sep 20 11:47:26 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mcx.c,v 1.18 2021/07/24 22:30:59 andvar Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.19 2021/09/20 11:47:26 jmcneill Exp $ */
 /*     $OpenBSD: if_mcx.c,v 1.99 2021/02/15 03:42:00 dlg Exp $ */
 
 /*
@@ -23,7 +23,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.18 2021/07/24 22:30:59 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.19 2021/09/20 11:47:26 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -8245,7 +8245,8 @@
            BUS_DMA_WAITOK) != 0)
                goto destroy;
        if (bus_dmamem_map(sc->sc_dmat, &mxm->mxm_seg, mxm->mxm_nsegs,
-           mxm->mxm_size, &mxm->mxm_kva, BUS_DMA_WAITOK) != 0)
+           mxm->mxm_size, &mxm->mxm_kva,
+           BUS_DMA_WAITOK | BUS_DMA_COHERENT) != 0)
                goto free;
        if (bus_dmamap_load(sc->sc_dmat, mxm->mxm_map, mxm->mxm_kva,
            mxm->mxm_size, NULL, BUS_DMA_WAITOK) != 0)



Home | Main Index | Thread Index | Old Index