mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: stratix10-rsu: correctly report unsupported DCMF commands
@ 2023-11-29 19:03 Beniamin Sandu
  2023-11-30  8:34 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Beniamin Sandu @ 2023-11-29 19:03 UTC (permalink / raw)
  To: dinguyen, linux-kernel; +Cc: Beniamin Sandu

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@gmail.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..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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-30  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 19:03 [PATCH] firmware: stratix10-rsu: correctly report unsupported DCMF commands Beniamin Sandu
2023-11-30  8:34 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®