[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231130095315.9614-1-beniaminsandu@gmail.com>
Date: Thu, 30 Nov 2023 09:53:15 +0000
From: Beniamin Sandu <beniaminsandu@...il.com>
To: dinguyen@...nel.org, linux-kernel@...r.kernel.org
Cc: Beniamin Sandu <beniaminsandu@...il.com>
Subject: [PATCH v2] firmware: stratix10-rsu: correctly report unsupported DCMF commands
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 <beniaminsandu@...il.com>
---
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..b7a472c3db7a 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
Powered by blists - more mailing lists