Author: nwhitehorn
Date: Sun Mar 13 21:23:25 2011
New Revision: 219624
URL: http://svn.freebsd.org/changeset/base/219624
Log:
Don't sleep while setting the clock. This can cause panics when
periodic_resettodr() calls CLOCK_SETTIME() and smu tries to sleep while
running from a callout.
Reported by: Torfinn Ingolfsen
Modified:
head/sys/powerpc/powermac/smu.c
Modified: head/sys/powerpc/powermac/smu.c
==============================================================================
--- head/sys/powerpc/powermac/smu.c Sun Mar 13 20:02:39 2011
(r219623)
+++ head/sys/powerpc/powermac/smu.c Sun Mar 13 21:23:25 2011
(r219624)
@@ -1177,7 +1177,7 @@ smu_gettime(device_t dev, struct timespe
static int
smu_settime(device_t dev, struct timespec *ts)
{
- struct smu_cmd cmd;
+ static struct smu_cmd cmd;
struct clocktime ct;
cmd.cmd = SMU_RTC;
@@ -1194,7 +1194,7 @@ smu_settime(device_t dev, struct timespe
cmd.data[6] = bin2bcd(ct.mon);
cmd.data[7] = bin2bcd(ct.year - 2000);
- return (smu_run_cmd(dev, &cmd, 1));
+ return (smu_run_cmd(dev, &cmd, 0));
}
/* SMU I2C Interface */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"