Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4803822rdh; Wed, 29 Nov 2023 11:04:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXZWY3kqDuP2shzZVUkNBfOKbprOz9e7aZT7Yjdf9/SxapYVPNtHNnBksZCmzsDq11FvgI X-Received: by 2002:a17:903:22d0:b0:1cf:d06e:d730 with SMTP id y16-20020a17090322d000b001cfd06ed730mr12772800plg.1.1701284660417; Wed, 29 Nov 2023 11:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701284660; cv=none; d=google.com; s=arc-20160816; b=Zf7VWdshGmeuQ8bORh+nMwk7KMHCQ32LSZibmv9zZqvqcYhLaQCfBnsDo4GqfTSXqe memh3kN2FwukuXmU7RLlP3LaqFqAlwFgkHUUe7hpTJeh8Nmy8iyWZxqIBTQXtM6UvFS8 PQqHj7QsRy9Jr+BYxpb1MbB9rY+yIRp02zWyXt7M2p3VJmgykOOFoVYkVkm8ePq7xoV8 WHV4kV0o/GS2UKxKixMusALjL6esQ6jOcHYl8emZMH9I0aJtcKJK9OstFyky2VF4iusd l4g2e4zQGtOhb7+4t+lRRijhuejBhF7jgJHaJEBLU54s2lneexavlbb2w3vaRCGLwKIv waxQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=DgvbtukB8PwWlSirb4+jB7fmU1O+TkE4+ao/vcBWmcA=; fh=L66oVpwWxeSUBYvvBXk/Sw1cPBLfSmMWtPAdWxlAzP4=; b=uMWqcnWg15WZ9qgVZmu1EGHHNfAhKf+YyvbM+uL4OECwR6hPjWbz7QWOlpu/O8MmIX KRC2wgjNI7GgJw+UxbXtkJe0v74guHcZ5OAWqeLU9W1JzkPcLE1RvHBRGFKD66p9AaMO lGtPB1u+qZJ5MmmR0aSVAsydAX0fRLh33RqBQZU5vqX7AyXF0lOQu4e3Ayz7Y6ArhbiK jlvcqvu4UO9x7LW8F7Y6JjNt/2YNIb9jadQBNvIy3XjLollZl7FgxzEDMDJv0oYkbfbA BkRm0vbHfIqBhHixqi+DJXM9/T9ZWTYD1lnqQ74MC7GMuwCaahyKzlYxeNHvTFPTtY8S QfzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zox6clDd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z8-20020a1709027e8800b001cfdd2fe63csi5824452pla.312.2023.11.29.11.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 11:04:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Zox6clDd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6DAB2807F4BA; Wed, 29 Nov 2023 11:04:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232991AbjK2TEA (ORCPT + 99 others); Wed, 29 Nov 2023 14:04:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbjK2TD6 (ORCPT ); Wed, 29 Nov 2023 14:03:58 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2296AF4 for ; Wed, 29 Nov 2023 11:04:05 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-332ed1bd4cbso84379f8f.2 for ; Wed, 29 Nov 2023 11:04:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701284643; x=1701889443; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DgvbtukB8PwWlSirb4+jB7fmU1O+TkE4+ao/vcBWmcA=; b=Zox6clDdTJWc0IssMju+G9gZdSACcsmPxHxe4mFQQn+B2BEhHE5veLnoQj1vIxgfWW UFRWeXnMMOpdd0JjfOPHD6ioQCnmEGol4IXtQtyCavjLW2ejkWQ+b79WjYQSnbmT9Hwa F7RXaoVE+mqz7t1rIwYCLqc+D7mHt9WbUOm2DHowwCUwI6N+7N9+lx/ADmJdFjxZ6Te3 fYi0ONcJwM87HW93963fiYuhqN5lboDHrPD7q/Z6L1hP/0A/l1j4iwAjQMO9G8U7b141 TkYYm9Cd7l/JgCVE1qWh2cqTH41UyS02Dp0X88fn9gil4rKMBo+CJlTvBcVcLuOYxAHQ TTeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701284643; x=1701889443; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DgvbtukB8PwWlSirb4+jB7fmU1O+TkE4+ao/vcBWmcA=; b=JdZzzOp5QYrV4DeSN0uC2SbiWLrzUt8iSx9s6NbBgKK7MuHBDCqvIbl6f8jehhfm5U yG8Kz3EIHcCYYEndl6B74pUAQi05lUYO47ztNwFfYcmBAN3lolK4ZVnU+s38DDf2MUp0 GFWnF1ct7yfyLhSe4kmrlQ4en/yZqE4OKPrYIEmAwZ8SZiZe5QtvGShKti3ou+ML/RvT zkLDSquw3eGi7Rup6JC2jIis+hkfQjUoBhioNgCNx3tp6zAD1+H4wFX1RktZOSDNdDXY oXRqPLQ0YHklC0ahWcscPAyDbdrscy2MozgZWhsNdm9b04EzpoY9dRUigTdaas/3XtvZ Cpuw== X-Gm-Message-State: AOJu0YyjJL2jCZSqGEf8jLzoxJPpxxubtX51tfoNgG4FPwZa8t4inkbe 2RxcuzrMOIPFU9htAy1uBQo= X-Received: by 2002:a05:6000:371:b0:333:880:e29b with SMTP id f17-20020a056000037100b003330880e29bmr5580557wrf.4.1701284643290; Wed, 29 Nov 2023 11:04:03 -0800 (PST) Received: from uk-l1.corp.ad.wrs.com ([2a01:4b00:8855:a800:e253:bfaa:775:87a6]) by smtp.gmail.com with ESMTPSA id t20-20020a0560001a5400b00332f1900476sm4116946wry.81.2023.11.29.11.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 11:04:02 -0800 (PST) From: Beniamin Sandu To: dinguyen@kernel.org, linux-kernel@vger.kernel.org Cc: Beniamin Sandu Subject: [PATCH] firmware: stratix10-rsu: correctly report unsupported DCMF commands Date: Wed, 29 Nov 2023 19:03:36 +0000 Message-Id: <20231129190336.247674-1-beniaminsandu@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 11:04:15 -0800 (PST) On older firmware that doesn't support DCMF commands, driver will otherwise report those as failed to read, instead of unsupported. Signed-off-by: Beniamin Sandu --- drivers/firmware/stratix10-rsu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c index 4f7a7abada48..291a14db61c2 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -235,7 +235,9 @@ static void rsu_dcmf_version_callback(struct stratix10_svc_client *client, priv->dcmf_version.dcmf1 = FIELD_GET(RSU_DCMF1_MASK, *value1); priv->dcmf_version.dcmf2 = FIELD_GET(RSU_DCMF2_MASK, *value2); priv->dcmf_version.dcmf3 = FIELD_GET(RSU_DCMF3_MASK, *value2); - } else + } else if (data->status == BIT(SVC_STATUS_NO_SUPPORT)) + dev_warn(client->dev, "Secure FW doesn't support DCMF version.") + else dev_err(client->dev, "failed to get DCMF version\n"); complete(&priv->completion); @@ -264,7 +266,9 @@ static void rsu_dcmf_status_callback(struct stratix10_svc_client *client, *value); priv->dcmf_status.dcmf3 = FIELD_GET(RSU_DCMF3_STATUS_MASK, *value); - } else + } else if (data->status == BIT(SVC_STATUS_NO_SUPPORT)) + dev_warn(client->dev, "Secure FW doesn't support DCMF status.") + else dev_err(client->dev, "failed to get DCMF status\n"); complete(&priv->completion); -- 2.34.1