Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 01:15:26 +0000 (UTC)
From:      Tycho Nightingale <tychon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262274 - head/usr.sbin/bhyve
Message-ID:  <201402210115.s1L1FQ5n056587@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tychon
Date: Fri Feb 21 01:15:26 2014
New Revision: 262274
URL: http://svnweb.freebsd.org/changeset/base/262274

Log:
  Avoid clobbering the counter mode when issuing a latch command.
  
  Approved by:	grehan (co-mentor)

Modified:
  head/usr.sbin/bhyve/pit_8254.c

Modified: head/usr.sbin/bhyve/pit_8254.c
==============================================================================
--- head/usr.sbin/bhyve/pit_8254.c	Thu Feb 20 23:43:49 2014	(r262273)
+++ head/usr.sbin/bhyve/pit_8254.c	Fri Feb 21 01:15:26 2014	(r262274)
@@ -216,11 +216,12 @@ pit_8254_handler(struct vmctx *ctx, int 
 		
 		c = &counter[sel >> 6];
 		c->ctx = ctx;
-		c->mode = mode;
 		if (rw == TIMER_LATCH)
 			pit_update_counter(c, 1);
-		else
+		else {
+			c->mode = mode;
 			c->olbyte = 0;	/* reset latch after reprogramming */
+		}
 		
 		return (0);
 	}



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