Module Name:    src
Committed By:   matt
Date:           Sun May  3 00:04:06 UTC 2015

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

Log Message:
Deal with 64-bit BARs


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 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.43 src/sys/dev/pci/if_re_pci.c:1.44
--- src/sys/dev/pci/if_re_pci.c:1.43	Sat Mar 29 19:28:25 2014
+++ src/sys/dev/pci/if_re_pci.c	Sun May  3 00:04:06 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_re_pci.c,v 1.43 2014/03/29 19:28:25 christos Exp $	*/
+/*	$NetBSD: if_re_pci.c,v 1.44 2015/05/03 00:04:06 matt Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.43 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.44 2015/05/03 00:04:06 matt Exp $");
 
 #include <sys/types.h>
 
@@ -201,8 +201,12 @@ re_pci_attach(device_t parent, device_t 
 	switch (memtype) {
 	case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
 	case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
-		memh_valid = (pci_mapreg_map(pa, RTK_PCI_LOMEM,
-		    memtype, 0, &memt, &memh, NULL, &memsize) == 0);
+		memh_valid =
+		    (pci_mapreg_map(pa, RTK_PCI_LOMEM,
+		        memtype, 0, &memt, &memh, NULL, &memsize) == 0) ||
+		    (pci_mapreg_map(pa, RTK_PCI_LOMEM + 4,
+			PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT,
+			0, &memt, &memh, NULL, &memsize) == 0);
 		break;
 	default:
 		memh_valid = 0;

Reply via email to