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: <56714778.4070100@cogentembedded.com>
Date:	Wed, 16 Dec 2015 14:14:00 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Mans Rullgard <mans@...sr.com>, Tejun Heo <tj@...nel.org>,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 2/3] ata: sata_dwc_460ex: add phy support

Hello.

On 12/16/2015 2:25 AM, Mans Rullgard wrote:

> This adds support for powering on an optional PHY when activating the
> device.
>
> Signed-off-by: Mans Rullgard <mans@...sr.com>
[...]
> diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
> index 9985749..d07aae1 100644
> --- a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
[...]
> @@ -1318,6 +1320,21 @@ static int sata_dwc_probe(struct platform_device *ofdev)
>   	}
>   #endif
>
> +	hsdev->phy = devm_phy_optional_get(hsdev->dev, "sata-phy");
> +	if (IS_ERR(hsdev->phy)) {
> +		err = PTR_ERR(hsdev->phy);
> +		hsdev->phy = NULL;
> +		goto error_out;
> +	}
> +
> +	err = phy_init(hsdev->phy);
> +	if (err)
> +		goto error_out;

    If phy_init() fails, do we really need to call phy_exit()?

> +
> +	err = phy_power_on(hsdev->phy);
> +	if (err)
> +		goto error_out;
> +
>   	/*
>   	 * Now, register with libATA core, this will also initiate the
>   	 * device discovery process, invoking our port_start() handler &
> @@ -1331,6 +1348,7 @@ static int sata_dwc_probe(struct platform_device *ofdev)
>   	return 0;
>
>   error_out:
> +	phy_exit(hsdev->phy);
>   	iounmap(base);
>   	return err;
>   }
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ