diff options
-rw-r--r-- | sys/arch/macppc/dev/smu.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/smu.c b/sys/arch/macppc/dev/smu.c index 359ddfafa74..268d2148053 100644 --- a/sys/arch/macppc/dev/smu.c +++ b/sys/arch/macppc/dev/smu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smu.c,v 1.13 2006/12/23 17:46:39 deraadt Exp $ */ +/* $OpenBSD: smu.c,v 1.14 2007/03/01 20:54:33 kettenis Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -294,6 +294,17 @@ smu_attach(struct device *parent, struct device *self, void *aux) sensor_attach(&sc->sc_sensordev, &fan->sensor); } + /* + * Bail out if we didn't find any fans. If we don't set the + * fans to a safe speed, but tickle the SMU periodically by + * reading sensors, the fans will never spin up and the + * machine might overheat. + */ + if (sc->sc_num_fans == 0) { + printf(": no fans\n"); + return; + } + /* Sensors */ node = OF_getnodebyname(ca->ca_node, "sensors"); for (node = OF_child(node); node; node = OF_peer(node)) { |