From 855a637172647afab4981ff2bd2409496a9a1b48 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Tue, 11 Jan 2011 08:08:15 +0200 Subject: [PATCH] 8250-serial: Emulate 8250 behaviour on autoprobing Signed-off-by: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- 8250-serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/8250-serial.c b/8250-serial.c index 8f66f4b..f53e4fa 100644 --- a/8250-serial.c +++ b/8250-serial.c @@ -229,6 +229,7 @@ static bool serial8250_in(struct kvm *self, uint16_t port, void *data, int size, ioport__write8(data, dev->ier); break; case UART_IIR: + dev->iir &= 0x3f; /* no FIFO for 8250 */ ioport__write8(data, dev->iir); break; case UART_LCR: @@ -244,7 +245,8 @@ static bool serial8250_in(struct kvm *self, uint16_t port, void *data, int size, ioport__write8(data, UART_MSR_CTS); break; case UART_SCR: - ioport__write8(data, dev->scr); + /* No SCR for 8250 */ + ioport__write8(data, 0); break; default: return false;