[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] hw/serial.c: Xmit fifo never used

From: Frank Mehnert
Subject: [Qemu-devel] hw/serial.c: Xmit fifo never used
Date: Wed, 26 May 2010 12:07:31 +0200
User-agent: KMail/1.9.9


the xmit fifo of the serial device is never used. If qemu_chr_write()
fails (interface currently not able to send characters) then the
transmit_timer should be engaged to try to send the current character
from the fifo again after some time. The code is

    } else if (qemu_chr_write(s->chr, &s->tsr, 1) != 1) {
        if ((s->tsr_retry > 0) && (s->tsr_retry <= MAX_XMIT_RETRY)) {
                           new_xmit_ts + s->char_transmit_time);

The problem is that this path is never used as tsr_retry is never > 0
initially. So if qemu_chr_write() fails, we never try again but drop
the character.

I assume the correct condition would be '>= 0', that is

        if ((s->tsr_retry >= 0) && (s->tsr_retry <= MAX_XMIT_RETRY)) {

Kind regards,

Dr.-Ing. Frank Mehnert

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Jürgen Kunz

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]