|
|
9ae3a8 |
From 8f143ae501a5bd1010dc4526ff8e0e85c4d2baf1 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 18 May 2017 09:21:29 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 16/18] serial: simplify tsr_retry reset
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <20170518092131.16571-17-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 75307
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.4 qemu-kvm PATCH v3 16/18] serial: simplify tsr_retry reset
|
|
|
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: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Move common code outside the if, and reset tsr_retry even in loopback mode.
|
|
|
9ae3a8 |
Right now it cannot become non-zero, but it will be possible as soon as
|
|
|
9ae3a8 |
we start respecting the baud rate.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Tested-by: Bret Ketchum <bcketchum@gmail.com>
|
|
|
9ae3a8 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit bce933b85a34514fe34fa559be1d8ccd1f39f954)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/char/serial.c | 4 +---
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/char/serial.c b/hw/char/serial.c
|
|
|
9ae3a8 |
index afa1932..fdda802 100644
|
|
|
9ae3a8 |
--- a/hw/char/serial.c
|
|
|
9ae3a8 |
+++ b/hw/char/serial.c
|
|
|
9ae3a8 |
@@ -254,10 +254,8 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
|
|
|
9ae3a8 |
s->tsr_retry++;
|
|
|
9ae3a8 |
return FALSE;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
- s->tsr_retry = 0;
|
|
|
9ae3a8 |
- } else {
|
|
|
9ae3a8 |
- s->tsr_retry = 0;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+ s->tsr_retry = 0;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* Transmit another byte if it is already available. It is only
|
|
|
9ae3a8 |
possible when FIFO is enabled and not empty. */
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|