Module Name:    src
Committed By:   jakllsch
Date:           Tue Jul 27 21:48:41 UTC 2010

Modified Files:
        src/sys/dev/pci: if_re_pci.c

Log Message:
Use 64-bit DMA tag (if available) on PCI-E re(4) NICs.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/if_re_pci.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_re_pci.c
diff -u src/sys/dev/pci/if_re_pci.c:1.39 src/sys/dev/pci/if_re_pci.c:1.40
--- src/sys/dev/pci/if_re_pci.c:1.39	Tue Jul 27 21:02:00 2010
+++ src/sys/dev/pci/if_re_pci.c	Tue Jul 27 21:48:41 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_re_pci.c,v 1.39 2010/07/27 21:02:00 jakllsch Exp $	*/
+/*	$NetBSD: if_re_pci.c,v 1.40 2010/07/27 21:48:41 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.39 2010/07/27 21:02:00 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.40 2010/07/27 21:48:41 jakllsch Exp $");
 
 #include <sys/types.h>
 
@@ -236,7 +236,10 @@
 	    t->rtk_basetype == RTK_8101E)
 		sc->sc_quirk |= RTKQ_PCIE;
 
-	sc->sc_dmat = pa->pa_dmat;
+	if (pci_dma64_available(pa) && (sc->sc_quirk & RTKQ_PCIE))
+		sc->sc_dmat = pa->pa_dmat64;
+	else
+		sc->sc_dmat = pa->pa_dmat;
 
 	/*
 	 * No power/enable/disable machinery for PCI attach;

Reply via email to