mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: stratix10-svc: remove RSU command exclusion from no-support callback
@ 2026-05-11  6:25 Adrian Ng Ho Yin
  2026-09-16 15:12 ` [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path Adrian Ng Ho Yin
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Ng Ho Yin @ 2026-05-11  6:25 UTC (permalink / raw)
  To: Dinh Nguyen, linux-kernel; +Cc: Adrian Ng Ho Yin

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 waiting
indefinitely.

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>
---
 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 39eb78f5905b..199e5673677f 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -803,20 +803,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


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

* [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path
  2026-05-11  6:25 [PATCH] firmware: stratix10-svc: remove RSU command exclusion from no-support callback Adrian Ng Ho Yin
@ 2026-09-16 15:12 ` Adrian Ng Ho Yin
  2026-09-18 15:04   ` Dinh Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Ng Ho Yin @ 2026-09-16 15:12 UTC (permalink / raw)
  To: Dinh Nguyen, linux-kernel; +Cc: Adrian Ng Ho Yin

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


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

* Re: [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path
  2026-09-16 15:12 ` [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path Adrian Ng Ho Yin
@ 2026-09-18 15:04   ` Dinh Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Dinh Nguyen @ 2026-09-18 15:04 UTC (permalink / raw)
  To: Adrian Ng Ho Yin, linux-kernel



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

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

end of thread, other threads:[~2026-09-18 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-11  6:25 [PATCH] firmware: stratix10-svc: remove RSU command exclusion from no-support callback Adrian Ng Ho Yin
2026-09-16 15:12 ` [PATCH RESEND] firmware: stratix10-svc: remove RSU exclusion from no-support path Adrian Ng Ho Yin
2026-09-18 15:04   ` Dinh Nguyen

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®