svn commit: r343077 - head/usr.sbin/bhyve

Marcelo Araujo araujo at FreeBSD.org
Wed Jan 16 03:46:28 UTC 2019


Author: araujo
Date: Wed Jan 16 03:46:27 2019
New Revision: 343077
URL: https://svnweb.freebsd.org/changeset/base/343077

Log:
  Fix broken uart on Win2016 guest.
  
  Obtained from:	Joyent (commit/2bf1a940afbd1382faff159e7c93c72779ca10f4)
  MFC after:	3 weeks.

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

Modified: head/usr.sbin/bhyve/uart_emul.c
==============================================================================
--- head/usr.sbin/bhyve/uart_emul.c	Wed Jan 16 03:07:32 2019	(r343076)
+++ head/usr.sbin/bhyve/uart_emul.c	Wed Jan 16 03:46:27 2019	(r343077)
@@ -431,6 +431,13 @@ uart_write(struct uart_softc *sc, int offset, uint8_t 
 		sc->thre_int_pending = true;
 		break;
 	case REG_IER:
+		/* Assert an interrupt if re-enabling the THRE intr, since we
+		 * always report THRE as active in the status register.
+		 */
+		if ((sc->ier & IER_ETXRDY) == 0 &&
+		    (value & IER_ETXRDY) != 0) {
+			sc->thre_int_pending = true;
+		}
 		/*
 		 * Apply mask so that bits 4-7 are 0
 		 * Also enables bits 0-3 only if they're 1


More information about the svn-src-head mailing list