Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/dev/pci Pull up rev. 1.8:



details:   https://anonhg.NetBSD.org/src/rev/5e95c9e6fd70
branches:  netbsd-1-5
changeset: 488314:5e95c9e6fd70
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jun 28 17:43:42 2000 +0000

description:
Pull up rev. 1.8:
Don't check for a BAR address past PCI_MAPREG_END; some devices
have BARs way out in left field.

diffstat:

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

diffs (43 lines):

diff -r bfc7b70eaacc -r 5e95c9e6fd70 sys/dev/pci/pci_map.c
--- a/sys/dev/pci/pci_map.c     Wed Jun 28 13:56:09 2000 +0000
+++ b/sys/dev/pci/pci_map.c     Wed Jun 28 17:43:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_map.c,v 1.7 2000/05/10 16:58:42 thorpej Exp $      */
+/*     $NetBSD: pci_map.c,v 1.7.4.1 2000/06/28 17:43:42 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,15 @@
        pcireg_t address, mask;
        int s;
 
-       if (reg < PCI_MAPREG_START || reg >= PCI_MAPREG_END || (reg & 3))
+       if (reg < PCI_MAPREG_START ||
+#if 0
+           /*
+            * Can't do this check; some devices have mapping registers
+            * way out in left field.
+            */
+           reg >= PCI_MAPREG_END ||
+#endif
+           (reg & 3))
                panic("pci_io_find: bad request");
 
        /*
@@ -121,7 +129,15 @@
 
        is64bit = (PCI_MAPREG_MEM_TYPE(type) == PCI_MAPREG_MEM_TYPE_64BIT);
 
-       if (reg < PCI_MAPREG_START || reg >= PCI_MAPREG_END || (reg & 3))
+       if (reg < PCI_MAPREG_START ||
+#if 0
+           /*
+            * Can't do this check; some devices have mapping registers
+            * way out in left field.
+            */
+           reg >= PCI_MAPREG_END ||
+#endif
+           (reg & 3))
                panic("pci_mem_find: bad request");
 
        if (is64bit && (reg + 4) >= PCI_MAPREG_END)



Home | Main Index | Thread Index | Old Index