diff mbox series

Revert "ata: libahci_platform: comply to PHY framework"

Message ID 20190112233038.28465-1-olof@lixom.net
State Not Applicable
Delegated to: David Miller
Headers show
Series Revert "ata: libahci_platform: comply to PHY framework" | expand

Commit Message

Olof Johansson Jan. 12, 2019, 11:30 p.m. UTC
This reverts commit 49e54187ae0b2f9b5c0760e568a103baf4481610.

This doesn't compile. It seems that the generic driver is dependent on
the PHY_MODE_SATA symbol, which is nowhere to be found in the mainline,
nor linux-next, sources to date -- besides a local define in one Marvell
driver.

drivers/ata/libahci_platform.c:59:37: error: 'PHY_MODE_SATA' undeclared (first use in this function); did you mean 'PHY_MODE_PCIE'?

So, let's revert this until the needed external dependencies are
available.

Fixes: 49e54187ae0b2 ('ata: libahci_platform: comply to PHY framework')
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Grzegorz Jaszczyk <jaz@semihalf.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Olof Johansson <olof@lixom.net>
---
 drivers/ata/ahci.h             |  2 --
 drivers/ata/libahci_platform.c | 13 -------------
 2 files changed, 15 deletions(-)

Comments

Jens Axboe Jan. 12, 2019, 11:33 p.m. UTC | #1
On 1/12/19 4:30 PM, Olof Johansson wrote:
> This reverts commit 49e54187ae0b2f9b5c0760e568a103baf4481610.
> 
> This doesn't compile. It seems that the generic driver is dependent on
> the PHY_MODE_SATA symbol, which is nowhere to be found in the mainline,
> nor linux-next, sources to date -- besides a local define in one Marvell
> driver.
> 
> drivers/ata/libahci_platform.c:59:37: error: 'PHY_MODE_SATA' undeclared (first use in this function); did you mean 'PHY_MODE_PCIE'?
> 
> So, let's revert this until the needed external dependencies are
> available.

Agree, that's odd, and I apologize. This one has been floating around
for a while.

Acked-by: Jens Axboe <axboe@kernel.dk>
diff mbox series

Patch

diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 8810475f307ac..ef356e70e6de8 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -254,8 +254,6 @@  enum {
 	AHCI_HFLAG_IS_MOBILE		= (1 << 25), /* mobile chipset, use
 							SATA_MOBILE_LPM_POLICY
 							as default lpm_policy */
-	AHCI_HFLAG_SUSPEND_PHYS		= (1 << 26), /* handle PHYs during
-							suspend/resume */
 
 	/* ap->flags bits */
 
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 81b1a3332ed6d..4b900fc659f73 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -56,12 +56,6 @@  static int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
 		if (rc)
 			goto disable_phys;
 
-		rc = phy_set_mode(hpriv->phys[i], PHY_MODE_SATA);
-		if (rc) {
-			phy_exit(hpriv->phys[i]);
-			goto disable_phys;
-		}
-
 		rc = phy_power_on(hpriv->phys[i]);
 		if (rc) {
 			phy_exit(hpriv->phys[i]);
@@ -744,9 +738,6 @@  int ahci_platform_suspend_host(struct device *dev)
 	writel(ctl, mmio + HOST_CTL);
 	readl(mmio + HOST_CTL); /* flush */
 
-	if (hpriv->flags & AHCI_HFLAG_SUSPEND_PHYS)
-		ahci_platform_disable_phys(hpriv);
-
 	return ata_host_suspend(host, PMSG_SUSPEND);
 }
 EXPORT_SYMBOL_GPL(ahci_platform_suspend_host);
@@ -765,7 +756,6 @@  EXPORT_SYMBOL_GPL(ahci_platform_suspend_host);
 int ahci_platform_resume_host(struct device *dev)
 {
 	struct ata_host *host = dev_get_drvdata(dev);
-	struct ahci_host_priv *hpriv = host->private_data;
 	int rc;
 
 	if (dev->power.power_state.event == PM_EVENT_SUSPEND) {
@@ -776,9 +766,6 @@  int ahci_platform_resume_host(struct device *dev)
 		ahci_init_controller(host);
 	}
 
-	if (hpriv->flags & AHCI_HFLAG_SUSPEND_PHYS)
-		ahci_platform_enable_phys(hpriv);
-
 	ata_host_resume(host);
 
 	return 0;