From patchwork Thu Apr 19 23:50:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Oppenlander X-Patchwork-Id: 10351699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3C3960244 for ; Thu, 19 Apr 2018 23:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99F212858F for ; Thu, 19 Apr 2018 23:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E5BC2859F; Thu, 19 Apr 2018 23:51:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 288EA2858F for ; Thu, 19 Apr 2018 23:51:44 +0000 (UTC) Received: from localhost ([::1]:59866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9JL5-00062b-Ix for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 Apr 2018 19:51:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9JKB-0005PK-TN for qemu-devel@nongnu.org; Thu, 19 Apr 2018 19:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9JKB-0002Q4-5q for qemu-devel@nongnu.org; Thu, 19 Apr 2018 19:50:47 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:40302) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9JKB-0002Ol-1D for qemu-devel@nongnu.org; Thu, 19 Apr 2018 19:50:47 -0400 Received: by mail-qk0-x241.google.com with SMTP id o64so7214665qkl.7 for ; Thu, 19 Apr 2018 16:50:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=o1FdKVBf3KjcSKy+9CBrz+57XCiQ2QeTxqHB/2UQ0ac=; b=K3uUwc5F4NUyrTGhrKiHrBZ7BX+W8bY7vYjG32qtbyEzRpjZmLAoiIr766cHEVmmJD Te7QNf+5T9+t3pDl2N4728hM4QmYat4Gpz6E878STElN41SBjKMiJ1TXytq0eeQZkCBo k86AIVRtOhA1R+o6xqLqyAU+LDlmi4eqVcXkSmjH4pkTiwYh4lb+MvduXVzSVXZH4AO2 BvhwbcI+IHWPEYaMS5yjt2v8ArlBGdKXDJfnlEA558jxRYFjci3iVaYp0jTnKBJUmRy4 hb9itgbgaWlZSrR2NhFEaMQYTiP6wUBIo9fCnS54+ajmFbxxDrB5bGFu3PYJSfrJQGej e1fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=o1FdKVBf3KjcSKy+9CBrz+57XCiQ2QeTxqHB/2UQ0ac=; b=qtC6w8Piz6Fti7w1tktidCdHgOtD7OtUeRkPMK9PNlQcDOC+LLPHnRGI1FAGQKLPDB JPiA2Q0f7LrMV1uom0o6tmgHwXaZdNXIZy9V+vu52zEn3bGx67yxHLv8f8ebfzxajoL3 iQpHTpRUleBqsYHBFkpIqFC4q7cmleILh4Hm6SbUHtXacEVF16C+tupAvehsb4ED3X81 DbK88D4VNO4RdhzoaWrvfzERwN3zZuvtxT28xPSVw+lhWHNZTaYdWRvLbfWiTQJNi+6d Dz3Jj1XG9pgGRXarmwbhczPEY6ID8NuqGHrjEOTPPgBgyqmhW6FtPZv2cjssg0s0LMHK 1srQ== X-Gm-Message-State: ALQs6tC7BJ3ahn6bJGKi9Jidn4yCPcVZSLwcd7jK12TajxK29UwjHOMS u4PmsLGBpGtOmKcP4i2U2GHtfuH0XtwuhmC6aMT13Rxf X-Google-Smtp-Source: AB8JxZqbO5t3VR4+vOdxJYDJn8bKnW0/J7xaO0vtrNZkTvXK1qqZ5u83M+SBt0++XEtw/g0NEpwf/uR5V2L74IhqBCQ= X-Received: by 10.55.98.135 with SMTP id w129mr8319072qkb.300.1524181846188; Thu, 19 Apr 2018 16:50:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.140.73 with HTTP; Thu, 19 Apr 2018 16:50:45 -0700 (PDT) From: Patrick Oppenlander Date: Fri, 20 Apr 2018 09:50:45 +1000 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH] hw/char/cmsdk-apb-uart.c: Accept more input after character read X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The character frontend needs to be notified that the uart receive buffer is empty and ready to handle another character. Previously, the uart only worked correctly when receiving one character at a time. Signed-off-by: Patrick Oppenlander --- hw/char/cmsdk-apb-uart.c | 1 + 1 file changed, 1 insertion(+) r = s->state; diff --git a/hw/char/cmsdk-apb-uart.c b/hw/char/cmsdk-apb-uart.c index 9c0929d8a2..ddfbb25c24 100644 --- a/hw/char/cmsdk-apb-uart.c +++ b/hw/char/cmsdk-apb-uart.c @@ -157,6 +157,7 @@ static uint64_t uart_read(void *opaque, hwaddr offset, unsigned size) r = s->rxbuf; s->state &= ~R_STATE_RXFULL_MASK; cmsdk_apb_uart_update(s); + qemu_chr_fe_accept_input(&s->chr); break; case A_STATE: