On 2023/3/22 07:23, Bruce Ashfield wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know 
the content is safe.

I don't have any record of the original patch, can you resend it
as a v2 ?


OK.



Bruce

In message: Re: [linux-yocto][v5.10/standard/intel-sdk-5.10/intel-socfpga & 
v5.10/standard/preempt-rt/intel-sdk-5.10/intel-socfpga][PATCH] HSD #14017114324: 
fpga: stratix10-soc: wait for COMMAND_FIRMWARE_VERSION to complete
on 21/03/2023 Wenlin Kang wrote:

On 2023/2/23 17:02, [email protected] via lists.yoctoproject.org
wrote:

Ping ......

From: Teh Wen Ping <[email protected]>

commit b575e6b93a77c42ea31af0787347d5b3cc67fff4 from
https://github.com/altera-opensource/linux-socfpga.git

With the introduction of stratix10_svc_done(), all SMC call has to be
completed before calling stratix10_svc_done(). The driver is missing a
wait_for_completion_timeout() after requesting for
COMMAND_FIRMWARE_VERSION. This cause SVC driver to stop its thread before
COMMAND_FIRMWARE_VERSION is complete. Thus, the driver will receive
invalid firmware version.

Signed-off-by: Teh Wen Ping <[email protected]>
Signed-off-by: Wenlin Kang <[email protected]>
---
   drivers/fpga/stratix10-soc.c | 12 ++++++++++++
   1 file changed, 12 insertions(+)

diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c
index 225a1211ba62..ca253ee400cb 100644
--- a/drivers/fpga/stratix10-soc.c
+++ b/drivers/fpga/stratix10-soc.c
@@ -496,6 +496,18 @@ static int s10_probe(struct platform_device *pdev)
             goto probe_err;
     }
+   ret = wait_for_completion_timeout(
+           &priv->status_return_completion, S10_RECONFIG_TIMEOUT);
+   if (!ret) {
+           dev_err(dev, "timeout waiting for firmware version\n");
+           stratix10_svc_done(priv->chan);
+           fpga_mgr_free(mgr);
+           ret = -ETIMEDOUT;
+           goto probe_err;
+   }
+
+   ret = 0;
+
     stratix10_svc_done(priv->chan);
     platform_set_drvdata(pdev, mgr);
     return ret;



--
Thanks,
Wenlin Kang


--
Thanks,
Wenlin Kang

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12284): 
https://lists.yoctoproject.org/g/linux-yocto/message/12284
Mute This Topic: https://lists.yoctoproject.org/mt/97179309/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to