qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check
@ 2014-02-11  6:49 Peter Crosthwaite
  2014-02-11  9:55 ` Dr. David Alan Gilbert
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Crosthwaite @ 2014-02-11  6:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: mkletzan, peter.maydell, edgari, mjt, dgilbert

This was guarding against a full fifo rather than an empty fifo when
popping. Fix.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 hw/char/serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index 27dab7d..6d3b5af 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -225,7 +225,7 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
 
     if (s->tsr_retry <= 0) {
         if (s->fcr & UART_FCR_FE) {
-            s->tsr = fifo8_is_full(&s->xmit_fifo) ?
+            s->tsr = fifo8_is_empty(&s->xmit_fifo) ?
                         0 : fifo8_pop(&s->xmit_fifo);
             if (!s->xmit_fifo.num) {
                 s->lsr |= UART_LSR_THRE;
-- 
1.8.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-11 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11  6:49 [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check Peter Crosthwaite
2014-02-11  9:55 ` Dr. David Alan Gilbert
2014-02-11 12:38   ` [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptynesscheckk Alex Bennée
2014-02-11 12:41     ` Dr. David Alan Gilbert
2014-02-11 10:25 ` [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check Martin Kletzander
2014-02-11 10:29 ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).