summaryrefslogtreecommitdiffstats
path: root/sys/isa
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2007-07-27 09:34:42 +0000
committerdwmalone <dwmalone@FreeBSD.org>2007-07-27 09:34:42 +0000
commit16ad7cce99fdefc348a2c705afbcdccf1057386f (patch)
treef77724bc66fab766124306f6e6f47ca30b61fb69 /sys/isa
parentc2dedaa0a97d92108e28cc25b06bf5442d7488e9 (diff)
downloadFreeBSD-src-16ad7cce99fdefc348a2c705afbcdccf1057386f.zip
FreeBSD-src-16ad7cce99fdefc348a2c705afbcdccf1057386f.tar.gz
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 <faber@lunabase.org> Approved by: re (rwatson) MFC after: 3 weeks
Diffstat (limited to 'sys/isa')
-rw-r--r--sys/isa/atrtc.c3
1 files changed, 2 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud