From nobody Mon Feb 9 17:24:18 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554757183318454.74727716920313; Mon, 8 Apr 2019 13:59:43 -0700 (PDT) Received: from localhost ([127.0.0.1]:58878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDbMb-0005Ii-9P for importer@patchew.org; Mon, 08 Apr 2019 16:59:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDbKP-0003t3-Mi for qemu-devel@nongnu.org; Mon, 08 Apr 2019 16:57:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDbKO-0007sc-3u for qemu-devel@nongnu.org; Mon, 08 Apr 2019 16:57:17 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:39618) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hDbKN-0007s0-R8 for qemu-devel@nongnu.org; Mon, 08 Apr 2019 16:57:16 -0400 Received: by mail-io1-xd2b.google.com with SMTP id e13so12308996ioq.6 for ; Mon, 08 Apr 2019 13:57:15 -0700 (PDT) Received: from worksec.wireless.oberlin.edu (ip-70-93.wireless.oberlin.edu. [132.162.70.93]) by smtp.gmail.com with ESMTPSA id h133sm5969313itb.34.2019.04.08.13.57.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Apr 2019 13:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oberlin-edu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n1ze122+JanIdZZCh4HuDj1UrrAxic8ImYq67LbwZwo=; b=i+Fg6LGFXS1k80RQg4i89RMhykchu4qvUTwiMSBlqroSqAqdcNPZU1yf5ouQg0xZ7l z9pG/sCfwr336xUKRsNCbX50HD+7BbyQekJf+J+vGbyEF0QRM+yyBXv89KfViZPtHfO3 BWt5BpJEEcH+rIHTq5wbjkBOTiXU49yoy+n6UccHGpFdTggwOGCf2RcDquXeAxijYDCe ZNUypcGxmTY9lytsJn6tfxnlFhgBB4XV87Mv6jEuuMOUAejt9Y2zSwGN34MH0OG1DQcY oc8ektIuNhuCR4Lw1vDxMz543p8sjlXzMsGEWoJEAhz3gH5BANKqsc8gW4qLL3VwOmx7 //FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n1ze122+JanIdZZCh4HuDj1UrrAxic8ImYq67LbwZwo=; b=BQc1Q0WsNu+5WiXm8XYTANkRIxkZNjl0M7SuonOcF0VSs9XlQZfXKGCj7ishVrGpss myN0tJXtLd5F9lA25MbRuVHN6cKmmJc/tOveWLEbF5C+oPMuuZhJWZC0f9SKS1DVTzt5 Q5PXzIJ77MtJkSQuh8zQu0VTjSrPqq377UnCJ3uFuZSPQtkOvA+/YQM4PVO5wnY4a2Zf ypSv9bc8e6CIvcur3GN544dNJxSoqRCMFK+NutKSaAkuJ/SGItDhsf/E65m5mjypyCiQ L5jnF8I4VDB34q2Gh8AUwcOBLqpnDzxJoc26oPtqJ70ORaApxju03Ljhib3HE/BuQjcp xHzA== X-Gm-Message-State: APjAAAV0zufD9VRY8mX+X43pttY/GPleLOb7pgaz/xpirGw+AkhpaFLM cSRvWqmwdgCCAGcu7MwWL+JGHFbov32UpQ== X-Google-Smtp-Source: APXvYqzwNCDonoA6DDzhyWIyN7lyyr7mcr7kwcyDxOQZ+HsDeisMyaOq8K2fEvynRl8qxDfIYa6zxQ== X-Received: by 2002:a6b:e009:: with SMTP id z9mr19461189iog.127.1554757035145; Mon, 08 Apr 2019 13:57:15 -0700 (PDT) From: Stephen Checkoway To: qemu-devel@nongnu.org Date: Mon, 8 Apr 2019 16:55:50 -0400 Message-Id: <278aee36fb8106857717b7d567dedb167fa4ea4c.1554755001.git.stephen.checkoway@oberlin.edu> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2b Subject: [Qemu-devel] [PATCH 07/10] block/pflash_cfi02: Fix reset command not ignored during erase 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: , Cc: Kevin Wolf , Stephen Checkoway , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" When the flash device is performing a chip erase, all commands are ignored. When it is performing a sector erase, only the erase suspend command is valid, which is currently not supported. In particular, the reset command should not cause the device to reset to read array mode while programming is on going. --- hw/block/pflash_cfi02.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 32aba9a771..fa6929b9b6 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -325,7 +325,8 @@ static void pflash_write(void *opaque, hwaddr offset, u= int64_t value, pfl->bank_width * 2, value); } =20 - if (cmd =3D=3D 0xF0) { + /* Reset does nothing during chip erase and sector erase. */ + if (cmd =3D=3D 0xF0 && pfl->cmd !=3D 0x10 && pfl->cmd !=3D 0x30) { #if 0 DPRINTF("%s: flash reset asked (%02x %02x)\n", __func__, pfl->cmd, cmd); --=20 2.20.1 (Apple Git-117)