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