svn commit: r209418 - stable/8/sys/dev/amdsbwd

Andriy Gapon avg at FreeBSD.org
Tue Jun 22 07:55:30 UTC 2010


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)


More information about the svn-src-all mailing list