Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Bump MAX_CONF_DEV to 32, add some missing newlin...
details: https://anonhg.NetBSD.org/src/rev/849f758b1ec5
branches: trunk
changeset: 514456:849f758b1ec5
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Sep 03 03:46:26 2001 +0000
description:
Bump MAX_CONF_DEV to 32, add some missing newlines in error
messages, and add a TODO item (allocate all metadata dynamically).
diffstat:
sys/dev/pci/pciconf.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (82 lines):
diff -r 932fbbae099c -r 849f758b1ec5 sys/dev/pci/pciconf.c
--- a/sys/dev/pci/pciconf.c Mon Sep 03 01:51:39 2001 +0000
+++ b/sys/dev/pci/pciconf.c Mon Sep 03 03:46:26 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciconf.c,v 1.9 2001/08/31 01:00:16 briggs Exp $ */
+/* $NetBSD: pciconf.c,v 1.10 2001/09/03 03:46:26 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,6 +40,9 @@
/*
* To do:
+ * - Perform all data structure allocation dynamically, don't have
+ * statically-sized arrays ("oops, you lose because you have too
+ * many slots filled!")
* - Do this in 2 passes, with an MD hook to control the behavior:
* (1) Configure the bus (possibly including expansion
* ROMs.
@@ -81,7 +84,7 @@
#endif
/* per-bus constants. */
-#define MAX_CONF_DEV 8 /* Arbitrary */
+#define MAX_CONF_DEV 32 /* Arbitrary */
#define MAX_CONF_MEM (3 * MAX_CONF_DEV) /* Avg. 3 per device -- Arb. */
#define MAX_CONF_IO (3 * MAX_CONF_DEV) /* Avg. 1 per device -- Arb. */
@@ -353,7 +356,7 @@
if (pb->io_total > 0) {
if (parent->niowin >= MAX_CONF_IO) {
- printf("pciconf: too many I/O windows");
+ printf("pciconf: too many I/O windows\n");
goto err;
}
pb->io_total |= 0xfff; /* Round up */
@@ -369,7 +372,7 @@
if (pb->mem_total > 0) {
if (parent->nmemwin >= MAX_CONF_MEM) {
- printf("pciconf: too many MEM windows");
+ printf("pciconf: too many MEM windows\n");
goto err;
}
pb->mem_total |= 0xfffff; /* Round up */
@@ -385,7 +388,7 @@
if (pb->pmem_total > 0) {
if (parent->nmemwin >= MAX_CONF_MEM) {
- printf("pciconf: too many MEM windows");
+ printf("pciconf: too many MEM windows\n");
goto err;
}
pb->pmem_total |= 0xfffff; /* Round up */
@@ -504,7 +507,7 @@
}
if (pb->niowin >= MAX_CONF_IO) {
- printf("pciconf: too many I/O windows");
+ printf("pciconf: too many I/O windows\n");
return -1;
}
@@ -556,7 +559,7 @@
}
if (pb->nmemwin >= MAX_CONF_MEM) {
- printf("pciconf: too many memory windows");
+ printf("pciconf: too many memory windows\n");
return -1;
}
@@ -588,7 +591,7 @@
if (mask != 0 && mask != 0xffffffff) {
if (pb->nmemwin >= MAX_CONF_MEM) {
- printf("pciconf: too many memory windows");
+ printf("pciconf: too many memory windows\n");
return -1;
}
size = (u_int64_t) PCI_MAPREG_MEM_SIZE(mask);
Home |
Main Index |
Thread Index |
Old Index