summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libahci_platform.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-07-30 18:49:04 +0200
committerTejun Heo <tj@kernel.org>2014-07-30 18:49:04 +0200
commite8f781836dc3335b5533f6e177a105bbe3ee7345 (patch)
treeb6f05b7bf6e69bcc436ab894b7dc84c28c746d1a /drivers/ata/libahci_platform.c
parentahci: imx: add missing clk_disable_unprepare() on error in imx_sata_enable() (diff)
parentlibata: introduce ata_host->n_tags to avoid oops on SAS controllers (diff)
downloadlinux-e8f781836dc3335b5533f6e177a105bbe3ee7345.tar.xz
linux-e8f781836dc3335b5533f6e177a105bbe3ee7345.zip
Merge branch 'for-3.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata into for-3.17
The scheduled ahci platform patches depend on change in for-3.16-fixes. Pull it into for-3.17. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libahci_platform.c')
-rw-r--r--drivers/ata/libahci_platform.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index a958a2b8fd93..28840a2f470f 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -250,8 +250,13 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev)
if (IS_ERR(hpriv->phy)) {
rc = PTR_ERR(hpriv->phy);
switch (rc) {
- case -ENODEV:
case -ENOSYS:
+ /* No PHY support. Check if PHY is required. */
+ if (of_find_property(dev->of_node, "phys", NULL)) {
+ dev_err(dev, "couldn't get sata-phy: ENOSYS\n");
+ goto err_out;
+ }
+ case -ENODEV:
/* continue normally */
hpriv->phy = NULL;
break;