[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/6] serial: simplify tsr_retry reset
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH v2 2/6] serial: simplify tsr_retry reset |
Date: |
Thu, 23 Jun 2016 19:22:15 +0200 |
Move common code outside the if, and reset tsr_retry even in loopback mode.
Right now it cannot become non-zero, but it will be possible as soon as
we start respecting the baud rate.
Tested-by: Bret Ketchum <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/char/serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/serial.c b/hw/char/serial.c
index e65e9e0..904b218 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -258,10 +258,8 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition
cond, void *opaque)
s->tsr_retry++;
return FALSE;
}
- s->tsr_retry = 0;
- } else {
- s->tsr_retry = 0;
}
+ s->tsr_retry = 0;
/* Transmit another byte if it is already available. It is only
possible when FIFO is enabled and not empty. */
--
2.5.5
- [Qemu-devel] [PATCH v2 0/6] serial: flow control fixes, Paolo Bonzini, 2016/06/23
- [Qemu-devel] [PATCH v2 1/6] serial: make tsr_retry unsigned, Paolo Bonzini, 2016/06/23
- [Qemu-devel] [PATCH v2 5/6] serial: remove watch on reset, Paolo Bonzini, 2016/06/23
- [Qemu-devel] [PATCH v2 4/6] char: change qemu_chr_fe_add_watch to return unsigned, Paolo Bonzini, 2016/06/23
- [Qemu-devel] [PATCH v2 2/6] serial: simplify tsr_retry reset,
Paolo Bonzini <=
- [Qemu-devel] [PATCH v2 3/6] serial: separate serial_xmit and serial_watch_cb, Paolo Bonzini, 2016/06/23
- [Qemu-devel] [PATCH v2 6/6] serial: reinstate watch after migration, Paolo Bonzini, 2016/06/23
- Re: [Qemu-devel] [PATCH v2 0/6] serial: flow control fixes, Dr. David Alan Gilbert, 2016/06/24