From nobody Mon Feb 9 14:38:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547823599324683.8305973019661; Fri, 18 Jan 2019 06:59:59 -0800 (PST) Received: from localhost ([127.0.0.1]:40999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkVck-0003cs-8g for importer@patchew.org; Fri, 18 Jan 2019 09:59:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkVb1-0002Q3-8B for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkVb0-00075R-HU for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:11 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:36110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkVb0-00074W-BW for qemu-devel@nongnu.org; Fri, 18 Jan 2019 09:58:10 -0500 Received: by mail-wr1-x42e.google.com with SMTP id u4so15427375wrp.3 for ; Fri, 18 Jan 2019 06:58:10 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e27sm92094561wra.67.2019.01.18.06.58.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jan 2019 06:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ADTYk50WFEBySOqD/0LgeOCDoycSSIYLv2FA0ulk9kM=; b=Rt4/FutEr5bv+Kjit89PQz1RdqyFTn4qxeiO16iqFOCpxq8+C38uCag28OXSPYygN4 5q9pS6lfYrextNIGKFzO+azRu/yP4ggasdSBVeYiODUVlztjwBVclfBFV0Wd4luW9q6X EPYYdv+CTJdR8LxQy9KTlHbWsWfiSeSaIPHyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ADTYk50WFEBySOqD/0LgeOCDoycSSIYLv2FA0ulk9kM=; b=AWhJQI1geOZFO8nGWDVMh4byunKrZnAvyyjW/TQ5/X/mT9EUi+clybR2xy9Rk2P8Gt XRUuzmbbcSru1/DysmhtskWk0TcXHpx1MJYS1H5DhIcN7xd0FYvlSGdgl6SSCggfxbTG 24l0Oa7pBxrCLIj6N2nv8IdJIuqOKygg/YVkUuUlPiYTJUuSUg+rUWFjLVjkSFNRdhAl ij/GfHo8nu75kHEWT2b2gLNTMMF12AvzC22fksn7RZ2tMvwRwazpv1JtCINPu1bN/n3t s/ueRhdqDyMX3Q7pMmvaHXJv3+3tErq16r1aKt9VPHcs/pjCP9DG1yUSxbuzid6XL3LW vp/A== X-Gm-Message-State: AJcUukdVJvg51xU/OzZrLhqbd1NnAt0gKzyIA7jE+mXEu2lSLD+EmxZp ZLWX3//bNuXbX2DhgXTozyXFhH6d0GlBwg== X-Google-Smtp-Source: ALg8bN77EXBj9dL3k8V/T33URSM4e1Oi2+HSPOPmpOgwyGHbCsaAurz85U2x06WlFt6ol/0D1EfxOw== X-Received: by 2002:adf:fbc8:: with SMTP id d8mr16779342wrs.318.1547823488900; Fri, 18 Jan 2019 06:58:08 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 18 Jan 2019 14:57:17 +0000 Message-Id: <20190118145805.6852-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118145805.6852-1-peter.maydell@linaro.org> References: <20190118145805.6852-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e Subject: [Qemu-devel] [PULL 01/49] hw/char/stm32f2xx_usart: Do not update data register when device is disabled 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 When the device is disabled, the internal circuitry keeps the data register loaded and doesn't update it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20190104182057.8778-1-philmd@redhat.com Signed-off-by: Peter Maydell --- hw/char/stm32f2xx_usart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index f3363a2952d..10392c70e2d 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -53,14 +53,13 @@ static void stm32f2xx_usart_receive(void *opaque, const= uint8_t *buf, int size) { STM32F2XXUsartState *s =3D opaque; =20 - s->usart_dr =3D *buf; - if (!(s->usart_cr1 & USART_CR1_UE && s->usart_cr1 & USART_CR1_RE)) { /* USART not enabled - drop the chars */ DB_PRINT("Dropping the chars\n"); return; } =20 + s->usart_dr =3D *buf; s->usart_sr |=3D USART_SR_RXNE; =20 if (s->usart_cr1 & USART_CR1_RXNEIE) { --=20 2.20.1