summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-07-24 19:40:16 +0000
committeravg <avg@FreeBSD.org>2010-07-24 19:40:16 +0000
commit0dd9a760b4e6c729904b4821a46073d2840a105c (patch)
treee513cac31b409cab583f6829a9edef8aadeffe9d /sys/dev
parent7c5e0d2b67e71897ca85a124952f68b39a689994 (diff)
downloadFreeBSD-src-0dd9a760b4e6c729904b4821a46073d2840a105c.zip
FreeBSD-src-0dd9a760b4e6c729904b4821a46073d2840a105c.tar.gz
ichwd: correct range check for timeout value
This is similar to a fix in r189305 but for earlier ICH versions (<= 5). Reported by: someone via attilio Discussed with: des, attilio MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ichwd/ichwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index f268ef8..a3b112f 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -256,8 +256,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, unsigned int timeout)
uint8_t tmr_val8 = ichwd_read_tco_1(sc, TCO_TMR1);
tmr_val8 &= 0xc0;
- if (timeout > 0xbf)
- timeout = 0xbf;
+ if (timeout > 0x3f)
+ timeout = 0x3f;
tmr_val8 |= timeout;
ichwd_write_tco_1(sc, TCO_TMR1, tmr_val8);
} else {
OpenPOWER on IntegriCloud