Module Name: src
Committed By: thorpej
Date: Sun Mar 1 15:54:18 UTC 2020
Modified Files:
src/sys/dev/pci: if_xge.c
Log Message:
Use the 64-bit PCI DMA tag if available.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pci/if_xge.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_xge.c
diff -u src/sys/dev/pci/if_xge.c:1.33 src/sys/dev/pci/if_xge.c:1.34
--- src/sys/dev/pci/if_xge.c:1.33 Thu Jan 30 06:10:26 2020
+++ src/sys/dev/pci/if_xge.c Sun Mar 1 15:54:18 2020
@@ -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 @@ xge_attach(device_t parent, device_t sel
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);