346-v5.18-01-Revert-ata-ahci-mvebu-Make-SATA-PHY-optional-for-Arm.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From ee995101fde67f85a3cd4c74f4f92fc4592e726b Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
  3. Date: Thu, 3 Feb 2022 22:44:42 +0100
  4. Subject: [PATCH 1/3] Revert "ata: ahci: mvebu: Make SATA PHY optional for
  5. Armada 3720"
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. This reverts commit 45aefe3d2251e4e229d7662052739f96ad1d08d9.
  10. Armada 3720 PHY driver (phy-mvebu-a3700-comphy.c) does not return
  11. -EOPNOTSUPP from phy_power_on() callback anymore.
  12. So remove AHCI_HFLAG_IGN_NOTSUPP_POWER_ON flag from Armada 3720 plat data.
  13. AHCI_HFLAG_IGN_NOTSUPP_POWER_ON is not used by any other ahci driver, so
  14. remove this flag completely.
  15. Signed-off-by: Pali Rohár <[email protected]>
  16. Signed-off-by: Marek Behún <[email protected]>
  17. Acked-by: Miquel Raynal <[email protected]>
  18. Acked-by: Damien Le Moal <[email protected]>
  19. Link: https://lore.kernel.org/r/[email protected]
  20. Signed-off-by: Vinod Koul <[email protected]>
  21. ---
  22. drivers/ata/ahci.h | 2 --
  23. drivers/ata/ahci_mvebu.c | 2 +-
  24. drivers/ata/libahci_platform.c | 2 +-
  25. 3 files changed, 2 insertions(+), 4 deletions(-)
  26. --- a/drivers/ata/ahci.h
  27. +++ b/drivers/ata/ahci.h
  28. @@ -240,8 +240,6 @@ enum {
  29. as default lpm_policy */
  30. AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
  31. suspend/resume */
  32. - AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
  33. - from phy_power_on() */
  34. AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */
  35. /* ap->flags bits */
  36. --- a/drivers/ata/ahci_mvebu.c
  37. +++ b/drivers/ata/ahci_mvebu.c
  38. @@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data
  39. static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
  40. .plat_config = ahci_mvebu_armada_3700_config,
  41. - .flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
  42. + .flags = AHCI_HFLAG_SUSPEND_PHYS,
  43. };
  44. static const struct of_device_id ahci_mvebu_of_match[] = {
  45. --- a/drivers/ata/libahci_platform.c
  46. +++ b/drivers/ata/libahci_platform.c
  47. @@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahc
  48. }
  49. rc = phy_power_on(hpriv->phys[i]);
  50. - if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
  51. + if (rc) {
  52. phy_exit(hpriv->phys[i]);
  53. goto disable_phys;
  54. }