Received: from [140.186.70.92] (port=38265 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHDX2-0003GJ-RR for qemu-devel@nongnu.org; Wed, 26 May 2010 06:08:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHDX1-0004ch-Cm for qemu-devel@nongnu.org; Wed, 26 May 2010 06:08:12 -0400 Received: from gmp-eb-inf-1.sun.com ([192.18.6.21]:60154) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHDX1-0004cF-5b for qemu-devel@nongnu.org; Wed, 26 May 2010 06:08:11 -0400 Received: from fe-emea-10.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o4QA881n011766 for ; Wed, 26 May 2010 10:08:08 GMT MIME-version: 1.0 Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0L3000100UPRD800@fe-emea-10.sun.com> for qemu-devel@nongnu.org; Wed, 26 May 2010 11:07:54 +0100 (BST) Received: from vpn-129-150-124-102.germany.sun.com ([unknown] [129.150.124.102]) by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0L3000GGZUSMZ820@fe-emea-10.sun.com> for qemu-devel@nongnu.org; Wed, 26 May 2010 11:07:35 +0100 (BST) Date: Wed, 26 May 2010 12:07:31 +0200 From: Frank Mehnert Sender: Frank.Mehnert@Sun.COM Message-id: <201005261207.31310.frank.mehnert@sun.com> Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=nextPart1355536.DOVD5UTAse Content-transfer-encoding: 7BIT Subject: [Qemu-devel] hw/serial.c: Xmit fifo never used List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --nextPart1355536.DOVD5UTAse Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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) !=3D 1) { if ((s->tsr_retry > 0) && (s->tsr_retry <=3D 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 '>=3D 0', that is ... if ((s->tsr_retry >=3D 0) && (s->tsr_retry <=3D MAX_XMIT_RETRY)) { s->tsr_retry++; ... Kind regards, =46rank =2D-=20 Dr.-Ing. Frank Mehnert Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht M=FCnchen: HRB 161028 Gesch=E4ftsf=FChrer: J=FCrgen Kunz --nextPart1355536.DOVD5UTAse Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkv88uMACgkQ6z8pigLf3Ef/pQCfauiPwrEww8qDUnjV+kfrHG/4 ouUAnR+GwrL9LxoQ1p7QtpwgTCUrfyY6 =3rOu -----END PGP SIGNATURE----- --nextPart1355536.DOVD5UTAse--