[PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path

Adrian Ng Ho Yin posted 1 patch 1 week, 1 day ago
drivers/firmware/stratix10-svc.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
[PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path
Posted by Adrian Ng Ho Yin 1 week, 1 day ago
Remove the compatibility workaround for older firmware that excluded
COMMAND_RSU_UPDATE and COMMAND_RSU_STATUS from the no-support callback.
This exclusion caused receive_cb to never be invoked for these commands
when firmware returned an unsupported response, leaving callers blocked
until their completion timeout.

Always invoke receive_cb with SVC_STATUS_NO_SUPPORT when the secure
firmware does not recognise a command, regardless of command type.

Signed-off-by: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
---
Link: https://lore.kernel.org/all/94bea0ef315adab7a8f9f9a4514eb961a9ea7be7.1778480470.git.adrian.ho.yin.ng@altera.com/

RESEND: refreshed against socfpga_firmware_for_v7.4; clarify commit
message (timeout wording, shorter subject).

 drivers/firmware/stratix10-svc.c | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index dd1c945f2bee..f803a1e947b6 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -933,20 +933,11 @@ static int svc_normal_to_secure_thread(void *data)
 		default:
 			pr_warn("Secure firmware doesn't support...\n");
 
-			/*
-			 * be compatible with older version firmware which
-			 * doesn't support newer RSU commands
-			 */
-			if ((pdata->command != COMMAND_RSU_UPDATE) &&
-				(pdata->command != COMMAND_RSU_STATUS)) {
-				cbdata->status =
-					BIT(SVC_STATUS_NO_SUPPORT);
-				cbdata->kaddr1 = NULL;
-				cbdata->kaddr2 = NULL;
-				cbdata->kaddr3 = NULL;
-				pdata->chan->scl->receive_cb(
-					pdata->chan->scl, cbdata);
-			}
+			cbdata->status = BIT(SVC_STATUS_NO_SUPPORT);
+			cbdata->kaddr1 = NULL;
+			cbdata->kaddr2 = NULL;
+			cbdata->kaddr3 = NULL;
+			pdata->chan->scl->receive_cb(pdata->chan->scl, cbdata);
 			break;
 
 		}
-- 
2.49.GIT
Re: [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path
Posted by Dinh Nguyen 6 days, 13 hours ago

On 9/16/26 10:12, Adrian Ng Ho Yin wrote:
> Remove the compatibility workaround for older firmware that excluded
> COMMAND_RSU_UPDATE and COMMAND_RSU_STATUS from the no-support callback.
> This exclusion caused receive_cb to never be invoked for these commands
> when firmware returned an unsupported response, leaving callers blocked
> until their completion timeout.
> 
> Always invoke receive_cb with SVC_STATUS_NO_SUPPORT when the secure
> firmware does not recognise a command, regardless of command type.
> 
> Signed-off-by: Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>
> ---
> Link: https://lore.kernel.org/all/94bea0ef315adab7a8f9f9a4514eb961a9ea7be7.1778480470.git.adrian.ho.yin.ng@altera.com/
> 
> RESEND: refreshed against socfpga_firmware_for_v7.4; clarify commit
> message (timeout wording, shorter subject).
> 
>   drivers/firmware/stratix10-svc.c | 19 +++++--------------
>   1 file changed, 5 insertions(+), 14 deletions(-)
>
Applied!

Thanks,
Dinh