mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-05 05:01:33 +00:00
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: Asias He <asias.hejun@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
8315b1925c
commit
db34045c54
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user