Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Deal with 64-bit BARs
details: https://anonhg.NetBSD.org/src/rev/943d4ee1622e
branches: trunk
changeset: 337900:943d4ee1622e
user: matt <matt%NetBSD.org@localhost>
date: Sun May 03 00:04:06 2015 +0000
description:
Deal with 64-bit BARs
diffstat:
sys/dev/pci/if_re_pci.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 90900db0e60f -r 943d4ee1622e sys/dev/pci/if_re_pci.c
--- a/sys/dev/pci/if_re_pci.c Sat May 02 23:46:04 2015 +0000
+++ b/sys/dev/pci/if_re_pci.c Sun May 03 00:04:06 2015 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index