From 61fd9f1a1b4c2da63aaea22c5cd416bc3a684e95 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Thu, 15 Jun 2006 15:44:46 +0000 Subject: make the clock error calculation match dev/ic/com.c so that things with, say, a 10x clock work. --- sys/arch/i386/isa/pccom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch') 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) -- cgit v1.2.3