lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250122-socfpga_sip_svc_misc-v1-3-cbdcd034ae34@intel.com>
Date: Wed, 22 Jan 2025 13:58:45 +0800
From: Mahesh Rao <mahesh.rao@...el.com>
To: Moritz Fischer <mdf@...nel.org>, Wu Hao <hao.wu@...el.com>, 
 Xu Yilun <yilun.xu@...el.com>, Tom Rix <trix@...hat.com>, 
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, Dinh Nguyen <dinguyen@...nel.org>, 
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: linux-fpga@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Mahesh Rao <mahesh.rao@...era.com>, 
 Mahesh Rao <mahesh.rao@...el.com>
Subject: [PATCH 3/3] firmware: stratix10-svc: Add
 of_platform_default_populate()

Add of_platform_default_populate() to stratix10-svc
driver as the firmware/svc node was moved out of soc.
This fixes the failed probing of child drivers of
svc node.

Fixes: 23c3ebed382a ("arm64: dts: socfpga: agilex: move firmware out of soc node")

Signed-off-by: Mahesh Rao <mahesh.rao@...el.com>
---
 drivers/firmware/stratix10-svc.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index c5c78b869561b0c1e9602823ad1f501e98e3ce51..15a7207f7753dcd4e94da4aa9a6162fedb577fe9 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -1227,13 +1227,19 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
 	if (!svc->intel_svc_fcs) {
 		dev_err(dev, "failed to allocate %s device\n", INTEL_FCS);
 		ret = -ENOMEM;
-		goto err_unregister_dev;
+		goto err_unregister_rsu_dev;
 	}
 
 	ret = platform_device_add(svc->intel_svc_fcs);
 	if (ret) {
 		platform_device_put(svc->intel_svc_fcs);
-		goto err_unregister_dev;
+		goto err_unregister_rsu_dev;
+	}
+
+	ret = of_platform_default_populate(dev_of_node(dev), NULL, dev);
+	if (ret < 0) {
+		of_platform_depopulate(dev);
+		goto err_unregister_fcs_dev;
 	}
 
 	dev_set_drvdata(dev, svc);
@@ -1242,7 +1248,9 @@ static int stratix10_svc_drv_probe(struct platform_device *pdev)
 
 	return 0;
 
-err_unregister_dev:
+err_unregister_fcs_dev:
+	platform_device_unregister(svc->intel_svc_fcs);
+err_unregister_rsu_dev:
 	platform_device_unregister(svc->stratix10_svc_rsu);
 err_free_kfifo:
 	kfifo_free(&controller->svc_fifo);

-- 
2.35.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ