Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwaaY-0007xR-UD for qemu-devel@nongnu.org; Tue, 30 Mar 2010 08:30:34 -0400 Received: from [140.186.70.92] (port=44182 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwaaS-0007fq-D5 for qemu-devel@nongnu.org; Tue, 30 Mar 2010 08:30:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwaaR-0008He-1k for qemu-devel@nongnu.org; Tue, 30 Mar 2010 08:30:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64698) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwaaQ-0008HX-Qq for qemu-devel@nongnu.org; Tue, 30 Mar 2010 08:30:27 -0400 From: Juan Quintela In-Reply-To: (Markus Armbruster's message of "Tue, 30 Mar 2010 13:00:57 +0200") References: <1269888491-845-1-git-send-email-ricardo.ribalda@gmail.com> Date: Tue, 30 Mar 2010 14:30:00 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] Elo touchpad 10 bytes emulator v2 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Ricardo Ribalda Delgado , qemu-devel@nongnu.org, zhur@ispras.ru, paul@codesourcery.com Markus Armbruster wrote: >>> I have to send a 2x10 bytes package, and it does not fit the the 16 >>> bytes buffer.... Any other suggestion about how to do it? >> >> Nope, I am not a 16550A guru at all. No sure if your change will break >> anything else or no, that is why I asked. > > The 16550 FIFOs are 16 bytes. The chips with larger FIFOs have > different model numbers, e.g. 16650 with 32 byte FIFOs. > > I can't see how the FIFO length limits your packet size. Could you > explain? Ah, I found it. Please look at hw/baum.c to see how to handle bigger packets. You can't write 10 + 10 bytes into 16 bytes in one go, you need to wait for the guest to consume some bits before you sent something more. see how baum_accept_input() handle qemu_chr_can_read() output. Something like that should fix your problems. Later, Juan.