From patchwork Tue Feb 12 01:29:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 219716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ED7C62C0306 for ; Tue, 12 Feb 2013 12:35:54 +1100 (EST) Received: from localhost ([::1]:45002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U54mj-0003H4-AH for incoming@patchwork.ozlabs.org; Mon, 11 Feb 2013 20:35:49 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U54mR-0003Gg-6B for qemu-devel@nongnu.org; Mon, 11 Feb 2013 20:35:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U54mM-00071Z-QP for qemu-devel@nongnu.org; Mon, 11 Feb 2013 20:35:31 -0500 Received: from mail-ie0-x230.google.com ([2607:f8b0:4001:c03::230]:64078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U54mM-00070d-Ll for qemu-devel@nongnu.org; Mon, 11 Feb 2013 20:35:26 -0500 Received: by mail-ie0-f176.google.com with SMTP id k13so8362544iea.7 for ; Mon, 11 Feb 2013 17:35:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=g0D4+poHlnmPv2fpTJVOzcqDOTjWHHAlh3rzGIqQIEc=; b=TD895fxu7HUTdNDd1XQWkHMVTNzDNkJPBTP4WiF7TOdg9vxO7cjfjHZ0dZB3WClWMn E8TBiEx5X4+S1Nv5ll0Ao1NiR5UEjNN/p5+oRdSwQ+J2U2ct3+flAP5cpme5Xnp/o6at V2kD9uK1Pg8jzZesldu325L+uNHy0d0KSqBRbG8OESsRkmI9llBP2zDdcQFcAs0dvKRG exzAcyzOqjj1UjQ8/+VoPYtw6EJsKmcKC++uI+1rDhV9KvSeNlDqLw7HRh0To0Q72zwo e9Mg6WswYqlkqJLw0U8Ln83RpgI4tasPIrbeEMjcwi1xv865wVVrARDaHsIbNYAOgRp9 mTqw== X-Received: by 10.50.186.134 with SMTP id fk6mr15715598igc.9.1360632595960; Mon, 11 Feb 2013 17:29:55 -0800 (PST) Received: from localhost ([1.141.74.174]) by mx.google.com with ESMTPS id uy13sm31370391igb.7.2013.02.11.17.29.52 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 11 Feb 2013 17:29:54 -0800 (PST) From: Peter Crosthwaite To: qemu-devel@nongnu.org Date: Tue, 12 Feb 2013 11:29:31 +1000 Message-Id: <1360632571-25638-1-git-send-email-peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 1.7.0.4 X-Gm-Message-State: ALoCoQlq3luMYWKTkPBZmN0KMpFqcCwwMaMaespbtJcVbDY2L9T7sUF2QVLXUoveZmkSVTt5Hxwm X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::230 Cc: Peter Crosthwaite Subject: [Qemu-devel] [PATCH for-1.4] cadance_uart: Accept input after rx FIFO pop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The device returns false from the can receive function when the FIFO is full. This means the device should check for buffered input whenever a byte is popped from the FIFO. Reported-by: Jason Wu Signed-off-by: Peter Crosthwaite --- hw/cadence_uart.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c index cf2f53c..5766d38 100644 --- a/hw/cadence_uart.c +++ b/hw/cadence_uart.c @@ -343,6 +343,7 @@ static void uart_read_rx_fifo(UartState *s, uint32_t *c) if (!s->rx_count) { s->r[R_SR] |= UART_SR_INTR_REMPTY; } + qemu_chr_accept_input(s->chr); } else { *c = 0; s->r[R_SR] |= UART_SR_INTR_REMPTY;