[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 26/32] serial: simplify tsr_retry reset
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 26/32] serial: simplify tsr_retry reset |
Date: |
Tue, 28 Jun 2016 19:33:56 +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>
Reviewed-by: Dr. David Alan Gilbert <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.7.4
- [Qemu-devel] [PULL 14/32] ICH9 LPC: move call of isa_bus_irqs to 'realize' method, (continued)
- [Qemu-devel] [PULL 14/32] ICH9 LPC: move call of isa_bus_irqs to 'realize' method, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 16/32] MC146818 RTC: add GPIO access to output IRQ, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 15/32] isa: introduce wrapper isa_connect_gpio_out, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 17/32] scsi: esp: fix migration, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 18/32] vnc: generalize "VNC server running on ..." message, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 19/32] pci-assign: Move "Invalid ROM" error message to pci-assign-load-rom.c, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 21/32] char: clean up remaining chardevs when leaving, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 22/32] socket: add listen feature, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 23/32] socket: unlink unix socket on remove, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 24/32] iscsi: fix assertion in is_sector_request_lun_aligned, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 26/32] serial: simplify tsr_retry reset,
Paolo Bonzini <=
- [Qemu-devel] [PULL 20/32] target-*: Don't redefine cpu_exec(), Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 25/32] serial: make tsr_retry unsigned, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 29/32] serial: remove watch on reset, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 27/32] serial: separate serial_xmit and serial_watch_cb, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 30/32] serial: reinstate watch after migration, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 32/32] ich9: implement SCI_IRQ_SEL register, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 28/32] char: change qemu_chr_fe_add_watch to return unsigned, Paolo Bonzini, 2016/06/28
- [Qemu-devel] [PULL 31/32] ich9: implement ACPI_EN register, Paolo Bonzini, 2016/06/28
- Re: [Qemu-devel] [PULL 00/32] Misc patches for QEMU soft freeze, Peter Maydell, 2016/06/29