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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"