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: <52CE85E9.7040703@cogentembedded.com>
Date:	Thu, 09 Jan 2014 15:20:09 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Roger Quadros <rogerq@...com>, tj@...nel.org
CC:	kishon@...com, b.zolnierkie@...sung.com, hdegoede@...hat.com,
	arnd@...db.de, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Balaji T K <balajitk@...com>
Subject: Re: [PATCH v4 2/3] ata: ahci_platform: Manage SATA PHY

On 09-01-2014 14:56, Roger Quadros wrote:

> From: Balaji T K <balajitk@...com>

> Some platforms have a PHY hooked up to the
> SATA controller. The PHY needs to be initialized
> and powered up for SATA to work. We do that
> using the PHY framework.

> [Roger Q] Cleaned up.

> CC: Tejun Heo <tj@...nel.org>
> Signed-off-by: Balaji T K <balajitk@...com>
> Signed-off-by: Roger Quadros <rogerq@...com>
[...]

> diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
> index d5ced13..b476642 100644
> --- a/drivers/ata/ahci_platform.c
> +++ b/drivers/ata/ahci_platform.c
> @@ -142,6 +142,39 @@ static int ahci_probe(struct platform_device *pdev)
>   		}
>   	}
>
> +	hpriv->phy = devm_phy_get(dev, "sata-phy");
> +	if (IS_ERR(hpriv->phy)) {
> +		rc = PTR_ERR(hpriv->phy);
> +		switch (rc) {
> +		case -ENODEV:
> +		case -ENOSYS:
> +			/* continue normally */
> +			hpriv->phy = NULL;
> +			break;
> +
> +		case -EPROBE_DEFER:
> +			goto disable_unprepare_clk;
> +			break;

    Well, well, *break* after *goto*? :-)

> +
> +		default:
> +			dev_err(dev, "couldn't get sata-phy\n");
> +			goto disable_unprepare_clk;
> +			break;

    Again?

WBR, 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