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: <MN2PR07MB6160046609B94969CAC0EB17C56C9@MN2PR07MB6160.namprd07.prod.outlook.com>
Date:   Mon, 15 Mar 2021 05:47:17 +0000
From:   Swapnil Kashinath Jakhade <sjakhade@...ence.com>
To:     Kishon Vijay Abraham I <kishon@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Lokesh Vutla <lokeshvutla@...com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH v6 02/13] phy: ti: j721e-wiz: Invoke wiz_init() before
 of_platform_device_create()



> -----Original Message-----
> From: Kishon Vijay Abraham I <kishon@...com>
> Sent: Wednesday, March 10, 2021 9:16 PM
> To: Kishon Vijay Abraham I <kishon@...com>; Vinod Koul
> <vkoul@...nel.org>; Rob Herring <robh+dt@...nel.org>; Philipp Zabel
> <p.zabel@...gutronix.de>; Swapnil Kashinath Jakhade
> <sjakhade@...ence.com>
> Cc: linux-kernel@...r.kernel.org; devicetree@...r.kernel.org; Lokesh Vutla
> <lokeshvutla@...com>; stable@...r.kernel.org
> Subject: [PATCH v6 02/13] phy: ti: j721e-wiz: Invoke wiz_init() before
> of_platform_device_create()
> 
> EXTERNAL MAIL
> 
> 
> Invoke wiz_init() before configuring anything else in Sierra/Torrent
> (invoked as part of of_platform_device_create()). wiz_init() resets the
> SERDES device and any configuration done in the probe() of
> Sierra/Torrent will be lost. In order to prevent SERDES configuration
> from getting reset, invoke wiz_init() immediately before invoking
> of_platform_device_create().
> 
> Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module
> present in TI J721E SoC")
> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
> Cc: <stable@...r.kernel.org> # v5.10
> ---
>  drivers/phy/ti/phy-j721e-wiz.c | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 

Reviewed-by: Swapnil Jakhade <sjakhade@...ence.com>

Thanks & regards,
Swapnil

> diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c
> index 995c7dbec77b..1bb73822f44a 100644
> --- a/drivers/phy/ti/phy-j721e-wiz.c
> +++ b/drivers/phy/ti/phy-j721e-wiz.c
> @@ -1262,27 +1262,24 @@ static int wiz_probe(struct platform_device
> *pdev)
>  		goto err_get_sync;
>  	}
> 
> +	ret = wiz_init(wiz);
> +	if (ret) {
> +		dev_err(dev, "WIZ initialization failed\n");
> +		goto err_wiz_init;
> +	}
> +
>  	serdes_pdev = of_platform_device_create(child_node, NULL, dev);
>  	if (!serdes_pdev) {
>  		dev_WARN(dev, "Unable to create SERDES platform
> device\n");
>  		ret = -ENOMEM;
> -		goto err_pdev_create;
> -	}
> -	wiz->serdes_pdev = serdes_pdev;
> -
> -	ret = wiz_init(wiz);
> -	if (ret) {
> -		dev_err(dev, "WIZ initialization failed\n");
>  		goto err_wiz_init;
>  	}
> +	wiz->serdes_pdev = serdes_pdev;
> 
>  	of_node_put(child_node);
>  	return 0;
> 
>  err_wiz_init:
> -	of_platform_device_destroy(&serdes_pdev->dev, NULL);
> -
> -err_pdev_create:
>  	wiz_clock_cleanup(wiz, node);
> 
>  err_get_sync:
> --
> 2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ