Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "ata: ahci: mvebu: Make SATA PHY optional for Armada 3720"

This reverts commit 45aefe3d2251e4e229d7662052739f96ad1d08d9.

Armada 3720 PHY driver (phy-mvebu-a3700-comphy.c) does not return
-EOPNOTSUPP from phy_power_on() callback anymore.

So remove AHCI_HFLAG_IGN_NOTSUPP_POWER_ON flag from Armada 3720 plat data.

AHCI_HFLAG_IGN_NOTSUPP_POWER_ON is not used by any other ahci driver, so
remove this flag completely.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Link: https://lore.kernel.org/r/20220203214444.1508-4-kabel@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Pali Rohár and committed by
Vinod Koul
ee995101 93433708

+2 -4
-2
drivers/ata/ahci.h
··· 240 240 as default lpm_policy */ 241 241 AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during 242 242 suspend/resume */ 243 - AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP 244 - from phy_power_on() */ 245 243 AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */ 246 244 247 245 /* ap->flags bits */
+1 -1
drivers/ata/ahci_mvebu.c
··· 227 227 228 228 static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = { 229 229 .plat_config = ahci_mvebu_armada_3700_config, 230 - .flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON, 230 + .flags = AHCI_HFLAG_SUSPEND_PHYS, 231 231 }; 232 232 233 233 static const struct of_device_id ahci_mvebu_of_match[] = {
+1 -1
drivers/ata/libahci_platform.c
··· 59 59 } 60 60 61 61 rc = phy_power_on(hpriv->phys[i]); 62 - if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) { 62 + if (rc) { 63 63 phy_exit(hpriv->phys[i]); 64 64 goto disable_phys; 65 65 }