Commit db34045c authored by Pekka Enberg's avatar Pekka Enberg Committed by Will Deacon
Browse files

kvm tools, 8250: Don't set the UART_LSR_OE bit



User input is buffered anyway, so it's pointless to set the UART_LSR_OE bit.
Instead, wait for the guest kernel to consume the current input and send a new
character when the guest is ready.

This fixes the following warnings in guest kernels:

[  207.485000] ttyS0: 1 input overrun(s)

Reported-by: default avatarAsias He <asias.hejun@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 8315b192
......@@ -77,6 +77,9 @@ static void serial8250__receive(struct kvm *self, struct serial8250_device *dev)
{
int c;
if (dev->lsr & UART_LSR_DR)
return;
if (!is_readable(fileno(stdin)))
return;
......@@ -84,9 +87,6 @@ static void serial8250__receive(struct kvm *self, struct serial8250_device *dev)
if (c < 0)
return;
if (dev->lsr & UART_LSR_DR)
dev->lsr |= UART_LSR_OE;
dev->rbr = c;
dev->lsr |= UART_LSR_DR;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment