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 the 64-bit PCI DMA tag if available.



details:   https://anonhg.NetBSD.org/src/rev/3c93dfd0d94b
branches:  trunk
changeset: 969771:3c93dfd0d94b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Mar 01 05:51:46 2020 +0000

description:
Use the 64-bit PCI DMA tag if available.

diffstat:

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

diffs (30 lines):

diff -r f4b28a1e7b4d -r 3c93dfd0d94b sys/dev/pci/if_gem_pci.c
--- a/sys/dev/pci/if_gem_pci.c  Sun Mar 01 05:50:56 2020 +0000
+++ b/sys/dev/pci/if_gem_pci.c  Sun Mar 01 05:51:46 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_gem_pci.c,v 1.48 2018/12/09 11:14:02 jdolecek Exp $ */
+/*     $NetBSD: if_gem_pci.c,v 1.49 2020/03/01 05:51:46 thorpej Exp $ */
 
 /*
  *
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.48 2018/12/09 11:14:02 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.49 2020/03/01 05:51:46 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -184,7 +184,10 @@
 
        sc->sc_variant = GEM_UNKNOWN;
 
-       sc->sc_dmatag = pa->pa_dmat;
+       if (pci_dma64_available(pa))
+               sc->sc_dmatag = pa->pa_dmat64;
+       else
+               sc->sc_dmatag = pa->pa_dmat;
 
        sc->sc_flags |= GEM_PCI;
 



Home | Main Index | Thread Index | Old Index