aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichwd/ichwd.c
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2010-07-24 19:40:16 +0000
committerAndriy Gapon <avg@FreeBSD.org>2010-07-24 19:40:16 +0000
commit7f5b7f232394ad7a4e815fe755279eece957d22e (patch)
treee513cac31b409cab583f6829a9edef8aadeffe9d /sys/dev/ichwd/ichwd.c
parent6de27dc09f29af13281936fd4a3cde1f4961e081 (diff)
downloadsrc-7f5b7f232394ad7a4e815fe755279eece957d22e.tar.gz
src-7f5b7f232394ad7a4e815fe755279eece957d22e.zip
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
Notes
Notes: svn path=/head/; revision=210454
Diffstat (limited to 'sys/dev/ichwd/ichwd.c')
-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 f268ef887eb3..a3b112f06b21 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 {