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/7fa3767aea1f
branches:  trunk
changeset: 745388:7fa3767aea1f
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 0359891eee33 -r 7fa3767aea1f 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