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] [day] [month] [year] [list]
Message-ID: <Z6RfXSzMEVPlZAj6@yilunxu-OptiPlex-7050>
Date: Thu, 6 Feb 2025 15:06:05 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: Mahesh Rao <mahesh.rao@...el.com>
Cc: Moritz Fischer <mdf@...nel.org>, 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>,
	Wu Hao <hao.wu@...el.com>, Ho Yin <adrian.ho.yin.ng@...era.com>,
	Niravkumar L Rabara <nirav.rabara@...era.com>,
	linux-fpga@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, Mahesh Rao <mahesh.rao@...era.com>
Subject: Re: [PATCH v3 3/3] firmware: stratix10-svc: Add
 of_platform_default_populate()

On Tue, Feb 04, 2025 at 08:58:07PM +0800, Mahesh Rao wrote:
> 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")
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> 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 3c52cb73237a43aac6984e497d75bab389e3eb9d..e3f990d888d71829f0ab22b8a59aa7af0316bea0 100644
> --- a/drivers/firmware/stratix10-svc.c
> +++ b/drivers/firmware/stratix10-svc.c
> @@ -1224,22 +1224,28 @@ 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);

I checked of_platform_populate/of_platform_bus_create() and see these
functions will not error out if some sub device registration fails. So
LGTM.

Reviewed-by: Xu Yilun <yilun.xu@...el.com>

> +	if (ret)
> +		goto err_unregister_fcs_dev;
> +
>  	dev_set_drvdata(dev, svc);
>  
>  	pr_info("Intel Service Layer Driver Initialized\n");
>  
>  	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);
> @@ -1253,6 +1259,8 @@ static void stratix10_svc_drv_remove(struct platform_device *pdev)
>  	struct stratix10_svc *svc = dev_get_drvdata(&pdev->dev);
>  	struct stratix10_svc_controller *ctrl = platform_get_drvdata(pdev);
>  
> +	of_platform_depopulate(ctrl->dev);
> +
>  	platform_device_unregister(svc->intel_svc_fcs);
>  	platform_device_unregister(svc->stratix10_svc_rsu);
>  
> 
> -- 
> 2.35.3
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ