summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/stand
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-01-20 16:05:16 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-01-20 16:05:16 +0000
commit225d63b0077eb56e95e554d4fbf24a8bdc2da8dc (patch)
tree23bb6ad209389d6053bf0ac9d71ec7ebd148a468 /sys/arch/sparc64/stand
parentbdf42bd263292bc963db564af34f9a0ade56d25b (diff)
Check for disks deeper than 4 levels down in the Open Firmware device tree.
Makes softraid(4) boot possible on more sparc64 machines. Tested on Sun Fire machines by mikeb@ and Alexander Bochmann via misc@ ok mikeb@
Diffstat (limited to 'sys/arch/sparc64/stand')
-rw-r--r--sys/arch/sparc64/stand/ofwboot/diskprobe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/stand/ofwboot/diskprobe.c b/sys/arch/sparc64/stand/ofwboot/diskprobe.c
index 3d969a5eeef..e747729cfac 100644
--- a/sys/arch/sparc64/stand/ofwboot/diskprobe.c
+++ b/sys/arch/sparc64/stand/ofwboot/diskprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diskprobe.c,v 1.3 2014/12/09 18:05:16 stsp Exp $ */
+/* $OpenBSD: diskprobe.c,v 1.4 2016/01/20 16:05:15 stsp Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
@@ -110,12 +110,12 @@ void dump_node(int node)
/*
* Hunt through the device tree for disks. There should be no need to
- * go more than four levels deep.
+ * go more than 10 levels deep.
*/
void
diskprobe(void)
{
- int node, child, stack[4], depth;
+ int node, child, stack[10], depth;
char buf[32];
stack[0] = OF_peer(0);
@@ -146,7 +146,7 @@ diskprobe(void)
}
child = OF_child(node);
- if (child != 0 && child != -1 && depth < 3)
+ if (child != 0 && child != -1 && depth < 9)
stack[++depth] = child;
else
stack[depth] = OF_peer(stack[depth]);