Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Don't check for a BAR address past PCI_MAPREG_EN...
details: https://anonhg.NetBSD.org/src/rev/d9203b2b01fd
branches: trunk
changeset: 493994:d9203b2b01fd
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Jun 28 17:32:48 2000 +0000
description:
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 72cc609dd884 -r d9203b2b01fd sys/dev/pci/pci_map.c
--- a/sys/dev/pci/pci_map.c Wed Jun 28 17:12:48 2000 +0000
+++ b/sys/dev/pci/pci_map.c Wed Jun 28 17:32:48 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.8 2000/06/28 17:32:48 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