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/9fd7dcb6c177
branches:  trunk
changeset: 745414:9fd7dcb6c177
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Mar 01 15:54:18 2020 +0000

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

diffstat:

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

diffs (31 lines):

diff -r 3440a4469c23 -r 9fd7dcb6c177 sys/dev/pci/if_xge.c
--- a/sys/dev/pci/if_xge.c      Sun Mar 01 15:46:32 2020 +0000
+++ b/sys/dev/pci/if_xge.c      Sun Mar 01 15:54:18 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xge.c,v 1.33 2020/01/30 06:10:26 thorpej Exp $ */
+/*      $NetBSD: if_xge.c,v 1.34 2020/03/01 15:54:18 thorpej Exp $ */
 
 /*
  * Copyright (c) 2004, SUNET, Swedish University Computer Network.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.33 2020/01/30 06:10:26 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xge.c,v 1.34 2020/03/01 15:54:18 thorpej Exp $");
 
 
 #include <sys/param.h>
@@ -287,7 +287,11 @@
 
        sc = device_private(self);
        sc->sc_dev = self;
-       sc->sc_dmat = pa->pa_dmat;
+
+       if (pci_dma64_available(pa))
+               sc->sc_dmat = pa->pa_dmat64;
+       else
+               sc->sc_dmat = pa->pa_dmat;
 
        /* Get BAR0 address */
        memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, XGE_PIF_BAR);



Home | Main Index | Thread Index | Old Index