From nobody Tue May 21 16:13:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1607419258; cv=none; d=zohomail.com; s=zohoarc; b=OiBC68iQqpPZCOjCnTiLsePeFx0f03gxyVG4skJXJBi7eCwBHGpJV0QAbYstG7op6m/37kn4nv3DvOGeCOP+f3QdF8UFB7h5lpmCSN+ZTixzQjD8qD4mgZRFO/rZ9h/N4H/s70v1ZMtGlkxYUrbx5heE3Hldf8ecStAr17DS/V0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607419258; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=6c0PcrUb+n9MIK/aQZxxCQRBiXLJlTsg/U6vzaqiwRU=; b=KPTJmtaJeJDLa0gKKmKCUCyuVgNf9NvlCCw+8WcTxSJ8DDhpUqt4ejiBDB/XAZPIh2M6M5saQsjYkt6345yCWQBokU5FLHzGJ/dhEOIDB8rke0x71tasFw3K1u1B5GVbxnFb4o2UvZai+gvyVULAwGrOIPGKfSO09f9ugg5W0ME= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607419258316556.6741433912737; Tue, 8 Dec 2020 01:20:58 -0800 (PST) Received: from localhost ([::1]:51092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmZAz-0008LF-UW for importer@patchew.org; Tue, 08 Dec 2020 04:20:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmZ7N-0007ii-Ah; Tue, 08 Dec 2020 04:17:09 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:56747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmZ7J-0005kJ-Ik; Tue, 08 Dec 2020 04:17:09 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DE9983AA; Tue, 8 Dec 2020 04:17:02 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 08 Dec 2020 04:17:03 -0500 Received: from apples.local (80-167-98-190-cable.dk.customer.tdc.net [80.167.98.190]) by mail.messagingengine.com (Postfix) with ESMTPA id EFF8A1080068; Tue, 8 Dec 2020 04:16:59 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irrelevant.dk; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=6c0PcrUb+n9MIK/aQZxxCQRBiX LJlTsg/U6vzaqiwRU=; b=I0D2QlQlGsnqTW90gr8o0OlOnZBPvBHEgD7RLTDUVR i0yz0DZ/EdHMc+AlUeECbn7nJUuO8C2ha7gxxgKYG9SetyRaqcyARCUK0d3mYr4V ZxDgpFLZGA/4OF4aL8Q/9isFirGHk3+uvT/5kAIKR8mGvAss6wd4zKxhZYZHQkcW QCzB3vf9lDy5rR0o+U04T5HdIrtrTQro7NGbbqbz1b7x+mKjH4s26FJ9fg9+oFwO uVABfcyfZZiO8YQ5IUGVOg9GsyupwRWnazEbINZsc4QeIZeujL9gTRrmtHllRDz3 ylqkpA700wyg5j2TBZk7eT7WFCJT3+bKQQ9byx4GXLYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=6c0PcrUb+n9MIK/aQ ZxxCQRBiXLJlTsg/U6vzaqiwRU=; b=BIAZMNOJRkTEzmEZWLmjT+E7ZbZoogVT9 5urTlhA5gbuPkMHB0wI9tzx099ySnujX8QiZ+1Nmvezghb8Lcf4y9JhdkeKSGXOz zhbeeQ9/NqdLlKoUp9KqjHbFIVQ5xHnGlRcR5dVSZ+N9ljQUxrFFrvMgJLPMK2iY UpruBFm6eIFAXFO0h0oI4IHWhKt14dwO9hdhyJO+YxqpNQNkLsg4vZPgbzTTg1Wj 0RWTaNWumkN8jy4EKuFBu+XfdYSzkIayGB8BX1O/zhNjhX5JaXyZgWeKW4N1jg4i 1+5PG886xzkl+4WwrzOUP6oV/4osGpYpo33knpNeTOhHeFPkueeBQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudejiedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefmlhgruhhsucfl vghnshgvnhcuoehithhssehirhhrvghlvghvrghnthdrughkqeenucggtffrrghtthgvrh hnpeefveelvdeikeduueffteeggeefhedvffffjeeuueeludehvdegjeevjefhtdetheen ucfkphepkedtrdduieejrdelkedrudeltdenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehithhssehirhhrvghlvghvrghnthdrughk X-ME-Proxy: From: Klaus Jensen To: qemu-devel@nongnu.org Subject: [PATCH] hw/block/nvme: fix bad clearing of CAP Date: Tue, 8 Dec 2020 10:16:58 +0100 Message-Id: <20201208091658.41820-1-its@irrelevant.dk> X-Mailer: git-send-email 2.29.2 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=64.147.123.25; envelope-from=its@irrelevant.dk; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Klaus Jensen , Max Reitz , Klaus Jensen , Keith Busch Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Klaus Jensen Commit 37712e00b1f0 ("hw/block/nvme: factor out pmr setup") changed the control flow such that the CAP register is erronously cleared after nvme_init_pmr() has configured it. Since the entire NvmeCtrl structure is zero-filled initially, there is no need for the explicit clearing, so just remove it. Fixes: 37712e00b1f0 ("hw/block/nvme: factor out pmr setup") Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch Reviewed-by: Minwoo Im --- hw/block/nvme.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 8814201364c1..28416b18a5c0 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -3040,7 +3040,6 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pc= i_dev) id->psd[0].enlat =3D cpu_to_le32(0x10); id->psd[0].exlat =3D cpu_to_le32(0x4); =20 - n->bar.cap =3D 0; NVME_CAP_SET_MQES(n->bar.cap, 0x7ff); NVME_CAP_SET_CQR(n->bar.cap, 1); NVME_CAP_SET_TO(n->bar.cap, 0xf); --=20 2.29.2