From patchwork Thu Dec 22 18:38:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 35899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp107890wrn; Thu, 22 Dec 2022 10:43:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXtc6pqM6hLoFtr18+LMuB4OBfAv0qyta5uV/NIdugvMwx55FJvrX1ndek2WIp5//7yU6yLD X-Received: by 2002:a17:907:d407:b0:7ad:f962:dba1 with SMTP id vi7-20020a170907d40700b007adf962dba1mr6453226ejc.53.1671734632657; Thu, 22 Dec 2022 10:43:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671734632; cv=none; d=google.com; s=arc-20160816; b=EgCv5uY9ItFTLgd11r3h4kqgZJNcQ3/oxfBv/Dh0ihJJxmFFQwquh1BeD5VpZ+G5QY ZTjEIUpFIAHczgdMgMByhibXUJx3bQhGTcoS/hRJlRKLmFf8JsbiUh5V3g+FjRKC2XFK +7bzRdF+T+5l8tebj/5ritjI3fDaYNWnq7zA4kgowx8Un9sPbgp3hDebWF1ygiFsst58 g5x9pH6+78oU/WhoZup5IHS8Xam6KyrYYZfBy7zbMRTAnL8q9H+kIvMhXz+MDdtOVuLT a8Ryg6/sfgXKWLV93A4sZXHLWDVPIYko8+M3U0XM71sBDUKBZ15r7hmwOtmLOiP9btb/ lxDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eDXbYHKzesT3dofWcEIAvKjStKiP/tAUVLhsd//Azv4=; b=gqa+p3XCzUrl9/CwgEQ4bA3zLen9NJSMcvpvNYS96fsltYO03QfifbVTPLtIkTfrXp OwvZGaHFKlN/c9EcNri58+vLaLSs0YEg/MInhxi5WBanIWyWtZVyZJ/2N+4urLp6jh55 fK7lnKp8UcMD2v5cvodfAWgCCAS/PpVrK8eZf5Gz3bmbjqF/JT5z5Uii539+Rw1lF9DY ZSqd2M2oV8pgKxLwFbFeGgft/a8LzC39XIY7cDhkAUxL8HCXWf81lP/yPtuEYbamSJzg 9Hgpa04u0PDpojF+Arw871F8aS5A2Fyh9BRlUCYDrVf6m/KZzcdtqKN0aqMJnvAQSMgt MQ0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f24-20020a50fe18000000b0047f1a8093ebsi1176003edt.178.2022.12.22.10.43.28; Thu, 22 Dec 2022 10:43:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235288AbiLVSiu (ORCPT + 99 others); Thu, 22 Dec 2022 13:38:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbiLVSio (ORCPT ); Thu, 22 Dec 2022 13:38:44 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B33211C932 for ; Thu, 22 Dec 2022 10:38:43 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8E0551576; Thu, 22 Dec 2022 10:39:24 -0800 (PST) Received: from e120937-lin.. (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C80FC3FAFB; Thu, 22 Dec 2022 10:38:42 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, cristian.marussi@arm.com Subject: [PATCH 1/5] firmware: arm_scmi: Clear stale xfer->hdr.status Date: Thu, 22 Dec 2022 18:38:19 +0000 Message-Id: <20221222183823.518856-2-cristian.marussi@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221222183823.518856-1-cristian.marussi@arm.com> References: <20221222183823.518856-1-cristian.marussi@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752940814338311329?= X-GMAIL-MSGID: =?utf-8?q?1752940814338311329?= Stale error status reported from a previous message transaction must be cleared before starting a new transaction to avoid being confusingly reported in the following SCMI message dump traces. Signed-off-by: Cristian Marussi --- drivers/firmware/arm_scmi/driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index f818d00bb2c6..ffdad59ec81f 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -910,6 +910,8 @@ static int do_xfer(const struct scmi_protocol_handle *ph, xfer->hdr.protocol_id, xfer->hdr.seq, xfer->hdr.poll_completion); + /* Clear any stale status */ + xfer->hdr.status = SCMI_SUCCESS; xfer->state = SCMI_XFER_SENT_OK; /* * Even though spinlocking is not needed here since no race is possible