From: Frank Mehnert <Frank.Mehnert@Sun.COM>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] hw/serial.c: Xmit fifo never used
Date: Wed, 26 May 2010 12:07:31 +0200 [thread overview]
Message-ID: <201005261207.31310.frank.mehnert@sun.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
Hi,
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)) {
s->tsr_retry++;
qemu_mod_timer(s->transmit_timer,
new_xmit_ts + s->char_transmit_time);
return;
}
...
}
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)) {
s->tsr_retry++;
...
Kind regards,
Frank
--
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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2010-05-26 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 10:07 Frank Mehnert [this message]
2010-05-26 10:32 ` [Qemu-devel] Re: hw/serial.c: Xmit fifo never used Jan Kiszka
2010-05-26 11:06 ` Frank Mehnert
2010-05-26 11:16 ` Jan Kiszka
2010-05-26 11:42 ` Stefano Stabellini
2010-05-26 20:06 ` Frank Mehnert
2010-05-27 8:21 ` Jan Kiszka
2010-05-28 14:31 ` [Qemu-devel] " Paul Brook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201005261207.31310.frank.mehnert@sun.com \
--to=frank.mehnert@sun.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).