|
|
b28c64 |
From c9b0af3739fc5b79a20bf2492b5e8c1dea055dc0 Mon Sep 17 00:00:00 2001
|
|
|
b28c64 |
From: Fam Zheng <famz@redhat.com>
|
|
|
b28c64 |
Date: Fri, 19 May 2017 00:35:10 +0200
|
|
|
b28c64 |
Subject: [PATCH 05/18] char/serial: Fix emptyness check
|
|
|
b28c64 |
|
|
|
b28c64 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
b28c64 |
Message-id: <20170519003523.21163-6-famz@redhat.com>
|
|
|
b28c64 |
Patchwork-id: 75361
|
|
|
b28c64 |
O-Subject: [RHEL-7.3.z qemu-kvm PATCH 05/18] char/serial: Fix emptyness check
|
|
|
b28c64 |
Bugzilla: 1452332
|
|
|
b28c64 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
b28c64 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
b28c64 |
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
b28c64 |
|
|
|
b28c64 |
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
|
|
|
b28c64 |
|
|
|
b28c64 |
This was guarding against a full fifo rather than an empty fifo when
|
|
|
b28c64 |
popping. Fix.
|
|
|
b28c64 |
|
|
|
b28c64 |
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
|
|
|
b28c64 |
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
b28c64 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
b28c64 |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
b28c64 |
(cherry picked from commit 88c1ee73d3231c74ff90bcfc084a7589670ec244)
|
|
|
b28c64 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
b28c64 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
b28c64 |
---
|
|
|
b28c64 |
hw/char/serial.c | 2 +-
|
|
|
b28c64 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b28c64 |
|
|
|
b28c64 |
diff --git a/hw/char/serial.c b/hw/char/serial.c
|
|
|
b28c64 |
index 3345de1..489a885 100644
|
|
|
b28c64 |
--- a/hw/char/serial.c
|
|
|
b28c64 |
+++ b/hw/char/serial.c
|
|
|
b28c64 |
@@ -225,7 +225,7 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
|
|
|
b28c64 |
|
|
|
b28c64 |
if (s->tsr_retry <= 0) {
|
|
|
b28c64 |
if (s->fcr & UART_FCR_FE) {
|
|
|
b28c64 |
- s->tsr = fifo8_is_full(&s->xmit_fifo) ?
|
|
|
b28c64 |
+ s->tsr = fifo8_is_empty(&s->xmit_fifo) ?
|
|
|
b28c64 |
0 : fifo8_pop(&s->xmit_fifo);
|
|
|
b28c64 |
if (!s->xmit_fifo.num) {
|
|
|
b28c64 |
s->lsr |= UART_LSR_THRE;
|
|
|
b28c64 |
--
|
|
|
b28c64 |
1.8.3.1
|
|
|
b28c64 |
|