Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 2010 19:40:16 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210454 - head/sys/dev/ichwd
Message-ID:  <201007241940.o6OJeG82018627@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sat Jul 24 19:40:16 2010
New Revision: 210454
URL: http://svn.freebsd.org/changeset/base/210454

Log:
  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

Modified:
  head/sys/dev/ichwd/ichwd.c

Modified: head/sys/dev/ichwd/ichwd.c
==============================================================================
--- head/sys/dev/ichwd/ichwd.c	Sat Jul 24 18:54:57 2010	(r210453)
+++ head/sys/dev/ichwd/ichwd.c	Sat Jul 24 19:40:16 2010	(r210454)
@@ -256,8 +256,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, un
 		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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007241940.o6OJeG82018627>