Date: Tue, 22 Jun 2010 07:55:30 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r209418 - stable/8/sys/dev/amdsbwd Message-ID: <201006220755.o5M7tUAX080756@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Tue Jun 22 07:55:30 2010 New Revision: 209418 URL: http://svn.freebsd.org/changeset/base/209418 Log: MFC r208670: amdsbwd: fix nonsensical timeout calculations Modified: stable/8/sys/dev/amdsbwd/amdsbwd.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- stable/8/sys/dev/amdsbwd/amdsbwd.c Tue Jun 22 07:54:19 2010 (r209417) +++ stable/8/sys/dev/amdsbwd/amdsbwd.c Tue Jun 22 07:55:30 2010 (r209418) @@ -230,10 +230,10 @@ amdsbwd_event(void *arg, unsigned int cm cmd &= WD_INTERVAL; if (cmd < WD_TO_1SEC) cmd = 0; - timeout = ((uint64_t)1 << (cmd - WD_TO_1MS)) / sc->ms_per_tick; - if (timeout > sc->max_ticks) - timeout = sc->max_ticks; if (cmd) { + timeout = ((uint64_t)1 << (cmd - WD_TO_1MS)) / sc->ms_per_tick; + if (timeout > sc->max_ticks) + timeout = sc->max_ticks; if (timeout != sc->timeout) { amdsbwd_tmr_set(sc, timeout); if (!sc->active)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006220755.o5M7tUAX080756>