]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
firmware: stratix10-svc: Don't fail probe when async ops unsupported
authorMuhammad Amirul Asyraf Mohamad Jamian <muhammad.amirul.asyraf.mohamad.jamian@altera.com>
Thu, 16 Apr 2026 07:22:07 +0000 (00:22 -0700)
committerDinh Nguyen <dinguyen@kernel.org>
Thu, 28 May 2026 18:34:07 +0000 (13:34 -0500)
When the ATF version is too old to support SIP SVC v3 asynchronous
operations (e.g. ATF 2.5), stratix10_svc_async_init() returns
-EOPNOTSUPP. The probe function currently treats any non-zero return
as fatal and aborts, logging:

  stratix10-svc firmware:svc: Intel Service Layer Driver: ATF version \
    is not compatible for async operation
  stratix10-svc firmware:svc: probe with driver stratix10-svc failed \
    with error -95

This prevents the SVC driver from loading entirely, causing all
dependent client drivers (hwmon, RSU, FCS) to also fail to probe even
though they can operate correctly via the synchronous V1 SMC path.

Fix this by treating -EOPNOTSUPP from stratix10_svc_async_init() as a
non-fatal degraded condition. The driver loads in sync-only mode and
logs:

  stratix10-svc firmware:svc: Intel Service Layer Driver Initialized \
    (sync-only mode)

Fixes: bcb9f4f07061 ("firmware: stratix10-svc: Add support for async communication")
Cc: stable@vger.kernel.org
Signed-off-by: Muhammad Amirul Asyraf Mohamad Jamian <muhammad.amirul.asyraf.mohamad.jamian@altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
drivers/firmware/stratix10-svc.c

index 8a4f18602f36aa3ae32246825263a403dbac22c6..39eb78f5905b36def859cb9d72c489b3705deefd 100644 (file)
@@ -1961,10 +1961,14 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
        init_completion(&controller->complete_status);
 
        ret = stratix10_svc_async_init(controller);
-       if (ret) {
+       if (ret == -EOPNOTSUPP) {
+               dev_info(dev, "Intel Service Layer Driver Initialized (sync-only mode)\n");
+       } else if (ret) {
                dev_dbg(dev, "Intel Service Layer Driver: Error on stratix10_svc_async_init %d\n",
                        ret);
                goto err_destroy_pool;
+       } else {
+               dev_info(dev, "Intel Service Layer Driver Initialized\n");
        }
 
        fifo_size = sizeof(struct stratix10_svc_data) * SVC_NUM_DATA_IN_FIFO;