summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/macio
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-06-26 00:35:11 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-06-26 00:35:11 +0000
commita6b7f1b6f8741f37941684e939365056b5b10d0d (patch)
tree086e1f83485b6c8648ae9881557a11897a4b8ce4 /sys/dev/sound/macio
parente836f024cab4f558654df4b50e35acaeb14c802f (diff)
downloadFreeBSD-src-a6b7f1b6f8741f37941684e939365056b5b10d0d.zip
FreeBSD-src-a6b7f1b6f8741f37941684e939365056b5b10d0d.tar.gz
Do not attach to the sound device on G5 Xserves, which is actually an
LED controller used to run the load graph on the server's front panel. Reported by: Paul Mather <paul at gromit dot dlib dot vt dot edu> MFC after: 3 days
Diffstat (limited to 'sys/dev/sound/macio')
-rw-r--r--sys/dev/sound/macio/i2s.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/sound/macio/i2s.c b/sys/dev/sound/macio/i2s.c
index d1a5463..e35a262 100644
--- a/sys/dev/sound/macio/i2s.c
+++ b/sys/dev/sound/macio/i2s.c
@@ -158,6 +158,8 @@ static int
i2s_probe(device_t self)
{
const char *name;
+ phandle_t subchild;
+ char subchildname[255];
name = ofw_bus_get_name(self);
if (!name)
@@ -165,6 +167,16 @@ i2s_probe(device_t self)
if (strcmp(name, "i2s") != 0)
return (ENXIO);
+
+ /*
+ * Do not attach to "lightshow" I2S devices on Xserves. This controller
+ * is used there to control the LEDs on the front panel, and this
+ * driver can't handle it.
+ */
+ subchild = OF_child(OF_child(ofw_bus_get_node(self)));
+ if (subchild != 0 && OF_getprop(subchild, "name", subchildname,
+ sizeof(subchildname)) > 0 && strcmp(subchildname, "lightshow") == 0)
+ return (ENXIO);
device_set_desc(self, "Apple I2S Audio Controller");
OpenPOWER on IntegriCloud