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 pa_dmat64 if pci_dma64_available().



details:   https://anonhg.NetBSD.org/src/rev/04e0ffc3e02b
branches:  trunk
changeset: 433391:04e0ffc3e02b
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Sep 12 09:49:03 2018 +0000

description:
use pa_dmat64 if pci_dma64_available().

diffstat:

 sys/dev/pci/hdaudio_pci.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 72ceb05384e0 -r 04e0ffc3e02b sys/dev/pci/hdaudio_pci.c
--- a/sys/dev/pci/hdaudio_pci.c Wed Sep 12 09:45:59 2018 +0000
+++ b/sys/dev/pci/hdaudio_pci.c Wed Sep 12 09:49:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio_pci.c,v 1.9 2018/09/12 03:23:38 mrg Exp $ */
+/* $NetBSD: hdaudio_pci.c,v 1.10 2018/09/12 09:49:03 mrg Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.9 2018/09/12 03:23:38 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.10 2018/09/12 09:49:03 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -139,7 +139,10 @@
                return;
        }
        sc->sc_hdaudio.sc_memvalid = true;
-       sc->sc_hdaudio.sc_dmat = pa->pa_dmat;
+       if (pci_dma64_available(pa))
+               sc->sc_hdaudio.sc_dmat = pa->pa_dmat64;
+       else
+               sc->sc_hdaudio.sc_dmat = pa->pa_dmat;
 
        /* Map interrupt and establish handler */
        if (pci_intr_alloc(pa, &sc->sc_pihp, NULL, 0)) {



Home | Main Index | Thread Index | Old Index