aboutsummaryrefslogtreecommitdiff
path: root/sys/mips
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
committerIan Lepore <ian@FreeBSD.org>2014-02-02 19:17:28 +0000
commitadd35ed5b81bd56b4e0f1f9db0636b785cc0c8d1 (patch)
treef7a07f25a40a264286f85b60ecb1346dd35ef91b /sys/mips
parent6f34487cc9dca0d09c4bd0f11004895bb8add4bd (diff)
downloadsrc-add35ed5b81bd56b4e0f1f9db0636b785cc0c8d1.tar.gz
src-add35ed5b81bd56b4e0f1f9db0636b785cc0c8d1.zip
Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines. Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings. Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
Notes
Notes: svn path=/head/; revision=261410
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/beri/beri_pic.c3
-rw-r--r--sys/mips/beri/beri_simplebus.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/mips/beri/beri_pic.c b/sys/mips/beri/beri_pic.c
index f13f144bc991..008732fb66e4 100644
--- a/sys/mips/beri/beri_pic.c
+++ b/sys/mips/beri/beri_pic.c
@@ -254,6 +254,9 @@ static int
beripic_fdt_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "sri-cambridge,beri-pic"))
return (ENXIO);
diff --git a/sys/mips/beri/beri_simplebus.c b/sys/mips/beri/beri_simplebus.c
index 58927f9417f2..55b3149b50f9 100644
--- a/sys/mips/beri/beri_simplebus.c
+++ b/sys/mips/beri/beri_simplebus.c
@@ -144,6 +144,9 @@ static int
simplebus_probe(device_t dev)
{
+ if (!ofw_bus_status_okay(dev))
+ return (ENXIO);
+
if (!ofw_bus_is_compatible(dev, "simple-bus"))
return (ENXIO);