Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.11 (requested by kleink ...



details:   https://anonhg.NetBSD.org/src/rev/2ad82571011f
branches:  netbsd-1-6
changeset: 530852:2ad82571011f
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Oct 10 18:00:59 2003 +0000

description:
Pull up revision 1.11 (requested by kleink in ticket #1513):
When testing for a void region, use PCI_MAPREG_MEM_SIZE() for 32bit memaddr.
If the 32bit mask read is 0, wmask will be 0xffffffff00000000, and
PCI_MAPREG_MEM64_SIZE() won't make this 0.

diffstat:

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

diffs (28 lines):

diff -r 8e534ab6289f -r 2ad82571011f sys/dev/pci/pci_map.c
--- a/sys/dev/pci/pci_map.c     Fri Oct 10 17:58:41 2003 +0000
+++ b/sys/dev/pci/pci_map.c     Fri Oct 10 18:00:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_map.c,v 1.10 2001/11/13 07:48:47 lukem Exp $       */
+/*     $NetBSD: pci_map.c,v 1.10.10.1 2003/10/10 18:00:59 tron Exp $   */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_map.c,v 1.10 2001/11/13 07:48:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_map.c,v 1.10.10.1 2003/10/10 18:00:59 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -166,7 +166,8 @@
        waddress = (u_int64_t)address1 << 32UL | address;
        wmask = (u_int64_t)mask1 << 32UL | mask;
 
-       if (PCI_MAPREG_MEM64_SIZE(wmask) == 0) {
+       if ((is64bit && PCI_MAPREG_MEM64_SIZE(wmask) == 0) ||
+           (!is64bit && PCI_MAPREG_MEM_SIZE(mask) == 0)) {
                printf("pci_mem_find: void region\n");
                return (1);
        }



Home | Main Index | Thread Index | Old Index