diff options
author | avg <avg@FreeBSD.org> | 2009-03-03 15:50:24 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2009-03-03 15:50:24 +0000 |
commit | 20ac2eb4b28545fe7dd2e5033ed55f78f94d157e (patch) | |
tree | 572096ad38b61590a6212147bbb1f2d0b91b8147 /sys/dev/ichwd/ichwd.c | |
parent | 59d53a5bdbf149d89096dab7127b65683cd37dfa (diff) | |
download | FreeBSD-src-20ac2eb4b28545fe7dd2e5033ed55f78f94d157e.zip FreeBSD-src-20ac2eb4b28545fe7dd2e5033ed55f78f94d157e.tar.gz |
ichwd: correct range check for timeout value
Approved by: jhb (mentor)
Diffstat (limited to 'sys/dev/ichwd/ichwd.c')
-rw-r--r-- | sys/dev/ichwd/ichwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c index 35f8b5f..917a31a 100644 --- a/sys/dev/ichwd/ichwd.c +++ b/sys/dev/ichwd/ichwd.c @@ -220,8 +220,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, unsigned int timeout) uint16_t tmr_val16 = ichwd_read_tco_2(sc, TCO_TMR2); tmr_val16 &= 0xfc00; - if (timeout > 0x0bff) - timeout = 0x0bff; + if (timeout > 0x03ff) + timeout = 0x03ff; tmr_val16 |= timeout; ichwd_write_tco_2(sc, TCO_TMR2, tmr_val16); } |