From 16ad7cce99fdefc348a2c705afbcdccf1057386f Mon Sep 17 00:00:00 2001 From: dwmalone Date: Fri, 27 Jul 2007 09:34:42 +0000 Subject: It seems that some i386 mothermoards either do not implement the day of week field correctly, or they remember bad values that are written into the day of week field. For this reason, ignore the day of week field when reading the clock on i386 rather than bailing if it is set incorrectly. Problems were seen on a number of platforms, including VMWare, qemu, EPIA ME6000, Epox-3PTA and ABIT-SL30T. This is a slightly different fix to that proposed by Ted in his PR, but the same basic idea. PR: 111117 Submitted by: Ted Faber Approved by: re (rwatson) MFC after: 3 weeks --- sys/isa/atrtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/isa') diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index a519a9e..4b848c4 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -703,7 +703,8 @@ inittodr(time_t base) #else ct.year += 2000; #endif - /* Should we set dow = -1 because some clocks don't set it correctly? */ + /* Set dow = -1 because some clocks don't set it correctly. */ + ct.dow = -1; if (clock_ct_to_ts(&ct, &ts)) { printf("Invalid time in clock: check and reset the date!\n"); return; -- cgit v1.1