From nobody Sat Apr 5 18:10:21 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1738095289; cv=none; d=zohomail.com; s=zohoarc; b=D0R6izCEReGSS+WEWh+4gJyofnKOeJVqEXMov7uXb+yFGGPB79SWQToUriPQneZx97WVkz6Da3bV9LSunBTiqrkTvRYUwf9FeO8TorPlqZa15QKJrByxPWERK+l/xjs3NQJLnJ55qXSJmv3CfLPYNwaDSp5pQ0oGS8lTP17M2tE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1738095289; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=xIPqvChCUfqOgMcD+7liBSkFzj/Qghi4LvOlrz81nwo=; b=mHpDlFhAI3v/5MLx14EfVUpM088bwXRDUAUJ3veVT7krbx0jAepnPluvUdhHG8PuGKJarNAB6uxc8R5Wu6m0JenF4+StvxnQVtSA0UPY7HXtPI6s/3nWVUFxd+9y1abRIoFNNx9TQe66rvDgTHHKfsRR15fLAqHNssYZd2d3W7s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1738095289072764.2588440973716; Tue, 28 Jan 2025 12:14:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tcrxh-00025M-6U; Tue, 28 Jan 2025 15:13:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tcrxe-00024X-EU for qemu-devel@nongnu.org; Tue, 28 Jan 2025 15:13:26 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcrxb-0001Ym-UR for qemu-devel@nongnu.org; Tue, 28 Jan 2025 15:13:25 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4368a293339so69453915e9.3 for ; Tue, 28 Jan 2025 12:13:23 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa3efsm182524105e9.2.2025.01.28.12.13.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 12:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738095202; x=1738700002; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xIPqvChCUfqOgMcD+7liBSkFzj/Qghi4LvOlrz81nwo=; b=BHUaxAIHOQxf8L9EtAQkYls9ZRhuMh4QJPZAwxsoL9SmBR4gc93946kNtrrRBHA982 Dld/d2kPRphgbn3nEg+4d11Yf5M2wBlSm5LO+2ZN6GiT86/GSzCZVV7T+uyhsVnOAiHu NSdzPeGZM45Y0iF6/d/M1wv5dU6m0FL4gMmSTzw+QCiF/jmJszVgqRm52WxLx1XW2CEY syZj5K1k5BaSzF/ce1V4rtmxAoB5Zke2kS5ONd/Ly5ZCtjD6RrSBum95VGAZfCKxPOGY IgxU2xq3Qc5dkXUGI75xnBd8nMuShcXL5pvNfVKmYP6CWCpy4BlJBv8bkupLp1P0jr4q cLGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738095202; x=1738700002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xIPqvChCUfqOgMcD+7liBSkFzj/Qghi4LvOlrz81nwo=; b=ngdUBYQ8vFpR+Ycp6HiIf/1yrDBq7xjaQUIseqWSB3jTsgYXZy7HSy4hbgnuJHmuIB YBivNb3DqV7kPaWmZk/e/woQQJAPGylf8K2eSAHxnKGBPtgRFUwGJTeTRNQGjExoqqE5 PIH+rQG4dhiAwjEuPiFspC4hJSKyByWgCmOTr78ZE4benGYkHuMEmjpgFdOixlhuo7ep pEDH5IE4bicyMhCHkoSW/PBeikySW6iUVuVxq05bzj9US1E2cqqdC69r1GiXK2ZYXJ5M NlfAC+O3G21bGpTsJKokuVPdrNKbBp55l8qBJGzjq/InIP2/VEZPkVh2uGf72N+WZXpY LsiQ== X-Gm-Message-State: AOJu0YyLE+EW9p7nwoCsThnvRgh/YhsysLyKRE+MAs8wm7Dx681TT/f4 smwzcnhBVvaCiUtQad3WuQ0Klf9d98a4gDMrUvVLqsjKE6qHG+shftsa/bDR65UlJpm915QAdlw d X-Gm-Gg: ASbGncv1STT3V3v+NpPQRGeMQqNQIqKxa0RzxBYb1iF3iGIVduuzO7QDxg/FwUyl6Pz Tz4A/YN5xqIL5xLh6UIoUJnPrwTc6iVSaDFraURL1KhbttPD3n8viTaWRHSJTgHdhRc7Fi/n45H oCOkMCrB4Ap/JA3fMvXYeH2yrVcodGoZFYEIWBAXhoKZyewgvLB7DLtfPUIlCXdLgbk9EqdHwLu PYgJNcoqmWTqczkPZXIRAFnMwLGa/k4+OJ36CRwxIKCvQhrn47OpbOGUfpftm+V3b0FJZSV6p+h VGai6ZY66DkPEqv6v8C6xtI71f28Yu5X X-Google-Smtp-Source: AGHT+IGCM0Op2TXJCBEzQWlFxOpxPHAOSFQf1mNefKkExikmhNim6zAjepU8Qg0thJAL3/i5c/GjiA== X-Received: by 2002:a05:600c:1e20:b0:438:a1f4:3e9d with SMTP id 5b1f17b1804b1-438dc3c405dmr2360735e9.9.1738095202028; Tue, 28 Jan 2025 12:13:22 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/36] hw/char/imx_serial: Update all state before restarting ageing timer Date: Tue, 28 Jan 2025 20:12:43 +0000 Message-Id: <20250128201314.44038-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250128201314.44038-1-peter.maydell@linaro.org> References: <20250128201314.44038-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1738095290246019000 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Fixes characters to be "echoed" after each keystroke rather than after every other since imx_serial_rx_fifo_ageing_timer_restart() would see ~UTS1_RXEMP= TY only after every other keystroke. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/char/imx_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index cb6761d40e4..38b4865157e 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -401,14 +401,14 @@ static void imx_put_data(void *opaque, uint32_t value) if (fifo32_num_used(&s->rx_fifo) >=3D rxtl) { s->usr1 |=3D USR1_RRDY; } - - imx_serial_rx_fifo_ageing_timer_restart(s); - s->usr2 |=3D USR2_RDR; s->uts1 &=3D ~UTS1_RXEMPTY; if (value & URXD_BRK) { s->usr2 |=3D USR2_BRCD; } + + imx_serial_rx_fifo_ageing_timer_restart(s); + imx_update(s); } =20 --=20 2.34.1