summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/it.c
diff options
context:
space:
mode:
authorform <form@openbsd.org>2008-10-23 08:08:44 +0000
committerform <form@openbsd.org>2008-10-23 08:08:44 +0000
commit7ad6240e0befbc73e61089e6da8a925c82860807 (patch)
tree6d3e761c0b7593b4d05bdaf03cc0436ccfacacf1 /sys/dev/isa/it.c
parentDon't print redundant information in dmesg. (diff)
downloadwireguard-openbsd-7ad6240e0befbc73e61089e6da8a925c82860807.tar.xz
wireguard-openbsd-7ad6240e0befbc73e61089e6da8a925c82860807.zip
Round up to the nearest minute 16-bit timeout values for older IT8712 chips.
Diffstat (limited to 'sys/dev/isa/it.c')
-rw-r--r--sys/dev/isa/it.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/isa/it.c b/sys/dev/isa/it.c
index 74560168977..d6c981ed1cd 100644
--- a/sys/dev/isa/it.c
+++ b/sys/dev/isa/it.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: it.c,v 1.37 2008/10/22 05:38:17 form Exp $ */
+/* $OpenBSD: it.c,v 1.38 2008/10/23 08:08:44 form Exp $ */
/*
* Copyright (c) 2007-2008 Oleg Safiullin <form@pdp-11.org.ru>
@@ -483,6 +483,8 @@ it_wdog_cb(void *arg, int period)
*/
if (sc->sc_chipid == IT_ID_8712 && sc->sc_chiprev < 0x8 &&
period > 0xff) {
+ if (period % 60 >= 30)
+ period += 60;
period /= 60;
minutes++;
}