diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2006-06-15 15:44:46 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2006-06-15 15:44:46 +0000 |
commit | 61fd9f1a1b4c2da63aaea22c5cd416bc3a684e95 (patch) | |
tree | c1c852b58a92d077224a58a265ea21988e4a5001 /sys/arch/i386 | |
parent | 6132b25fc1c9106eea34f2d0ec39e5d2458581f0 (diff) |
make the clock error calculation match dev/ic/com.c so that things with,
say, a 10x clock work.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index cedee9e5fa8..f694dbe77e2 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.51 2006/04/27 19:31:43 deraadt Exp $ */ +/* $OpenBSD: pccom.c,v 1.52 2006/06/15 15:44:45 jason Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -204,7 +204,7 @@ comspeed(freq, speed) x = divrnd((freq / 16), speed); if (x <= 0) return -1; - err = divrnd((freq / 16) * 1000, speed * x) - 1000; + err = divrnd((quad_t)freq * 1000 / 16, speed * x) - 1000; if (err < 0) err = -err; if (err > COM_TOLERANCE) |