diff mbox series

[phy,v4,3/5] Revert "ata: ahci: mvebu: Make SATA PHY optional for Armada 3720"

Message ID 20220203214444.1508-4-kabel@kernel.org
State Accepted
Commit ee995101fde67f85a3cd4c74f4f92fc4592e726b
Headers show
Series Armada 3720 comphy native implementation | expand

Commit Message

Marek Behún Feb. 3, 2022, 9:44 p.m. UTC
From: Pali Rohár <pali@kernel.org>

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>
---
 drivers/ata/ahci.h             | 2 --
 drivers/ata/ahci_mvebu.c       | 2 +-
 drivers/ata/libahci_platform.c | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

Comments

Marek Behún Feb. 24, 2022, 3:13 p.m. UTC | #1
Dear Jens,

could you please send Ack for this patch?
https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/

It is a revert of another patch that was added because of potential
problems in comphy driver, and these are now solved by this series, but
Vinod says he can apply the ATA patch but he needs your Ack.

Thanks.

Marek

On Thu,  3 Feb 2022 22:44:42 +0100
Marek Behún <kabel@kernel.org> wrote:

> From: Pali Rohár <pali@kernel.org>
> 
> 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>
> ---
>  drivers/ata/ahci.h             | 2 --
>  drivers/ata/ahci_mvebu.c       | 2 +-
>  drivers/ata/libahci_platform.c | 2 +-
>  3 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
> index eeac5482f1d1..a57d90dd4964 100644
> --- a/drivers/ata/ahci.h
> +++ b/drivers/ata/ahci.h
> @@ -240,8 +240,6 @@ enum {
>  							as default lpm_policy */
>  	AHCI_HFLAG_SUSPEND_PHYS		= (1 << 26), /* handle PHYs during
>  							suspend/resume */
> -	AHCI_HFLAG_IGN_NOTSUPP_POWER_ON	= (1 << 27), /* ignore -EOPNOTSUPP
> -							from phy_power_on() */
>  	AHCI_HFLAG_NO_SXS		= (1 << 28), /* SXS not supported */
>  
>  	/* ap->flags bits */
> diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
> index 3ad46d26d9d5..d4bba3ace45d 100644
> --- a/drivers/ata/ahci_mvebu.c
> +++ b/drivers/ata/ahci_mvebu.c
> @@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {
>  
>  static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
>  	.plat_config = ahci_mvebu_armada_3700_config,
> -	.flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
> +	.flags = AHCI_HFLAG_SUSPEND_PHYS,
>  };
>  
>  static const struct of_device_id ahci_mvebu_of_match[] = {
> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
> index 18296443ccba..b26755bdc9d6 100644
> --- a/drivers/ata/libahci_platform.c
> +++ b/drivers/ata/libahci_platform.c
> @@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
>  		}
>  
>  		rc = phy_power_on(hpriv->phys[i]);
> -		if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
> +		if (rc) {
>  			phy_exit(hpriv->phys[i]);
>  			goto disable_phys;
>  		}
Jens Axboe Feb. 24, 2022, 3:14 p.m. UTC | #2
On 2/24/22 8:13 AM, Marek Beh?n wrote:
> Dear Jens,
> 
> could you please send Ack for this patch?
> https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/
> 
> It is a revert of another patch that was added because of potential
> problems in comphy driver, and these are now solved by this series, but
> Vinod says he can apply the ATA patch but he needs your Ack.

I'm not maintaining libata anymore, adding Damien who's the new
maintainer. Leaving email below.

> 
> Thanks.
> 
> Marek
> 
> On Thu,  3 Feb 2022 22:44:42 +0100
> Marek Beh?n <kabel@kernel.org> wrote:
> 
>> From: Pali Roh?r <pali@kernel.org>
>>
>> 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>
>> ---
>>  drivers/ata/ahci.h             | 2 --
>>  drivers/ata/ahci_mvebu.c       | 2 +-
>>  drivers/ata/libahci_platform.c | 2 +-
>>  3 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
>> index eeac5482f1d1..a57d90dd4964 100644
>> --- a/drivers/ata/ahci.h
>> +++ b/drivers/ata/ahci.h
>> @@ -240,8 +240,6 @@ enum {
>>  							as default lpm_policy */
>>  	AHCI_HFLAG_SUSPEND_PHYS		= (1 << 26), /* handle PHYs during
>>  							suspend/resume */
>> -	AHCI_HFLAG_IGN_NOTSUPP_POWER_ON	= (1 << 27), /* ignore -EOPNOTSUPP
>> -							from phy_power_on() */
>>  	AHCI_HFLAG_NO_SXS		= (1 << 28), /* SXS not supported */
>>  
>>  	/* ap->flags bits */
>> diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
>> index 3ad46d26d9d5..d4bba3ace45d 100644
>> --- a/drivers/ata/ahci_mvebu.c
>> +++ b/drivers/ata/ahci_mvebu.c
>> @@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {
>>  
>>  static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
>>  	.plat_config = ahci_mvebu_armada_3700_config,
>> -	.flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
>> +	.flags = AHCI_HFLAG_SUSPEND_PHYS,
>>  };
>>  
>>  static const struct of_device_id ahci_mvebu_of_match[] = {
>> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
>> index 18296443ccba..b26755bdc9d6 100644
>> --- a/drivers/ata/libahci_platform.c
>> +++ b/drivers/ata/libahci_platform.c
>> @@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
>>  		}
>>  
>>  		rc = phy_power_on(hpriv->phys[i]);
>> -		if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
>> +		if (rc) {
>>  			phy_exit(hpriv->phys[i]);
>>  			goto disable_phys;
>>  		}
>
Marek Behún Feb. 24, 2022, 3:37 p.m. UTC | #3
On Thu, 24 Feb 2022 08:14:58 -0700
Jens Axboe <axboe@kernel.dk> wrote:

> On 2/24/22 8:13 AM, Marek Beh?n wrote:
> > Dear Jens,
> > 
> > could you please send Ack for this patch?
> > https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/
> > 
> > It is a revert of another patch that was added because of potential
> > problems in comphy driver, and these are now solved by this series, but
> > Vinod says he can apply the ATA patch but he needs your Ack.  
> 
> I'm not maintaining libata anymore, adding Damien who's the new
> maintainer. Leaving email below.

Dear Damien,
could you look at this revert and give your Ack? See the quoted message
for Jens.

Thanks.

Marek
Damien Le Moal Feb. 24, 2022, 10:33 p.m. UTC | #4
On 2/25/22 00:37, Marek Behún wrote:
> On Thu, 24 Feb 2022 08:14:58 -0700
> Jens Axboe <axboe@kernel.dk> wrote:
> 
>> On 2/24/22 8:13 AM, Marek Beh?n wrote:
>>> Dear Jens,
>>>
>>> could you please send Ack for this patch?
>>> https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/
>>>
>>> It is a revert of another patch that was added because of potential
>>> problems in comphy driver, and these are now solved by this series, but
>>> Vinod says he can apply the ATA patch but he needs your Ack.  
>>
>> I'm not maintaining libata anymore, adding Damien who's the new
>> maintainer. Leaving email below.
> 
> Dear Damien,
> could you look at this revert and give your Ack? See the quoted message
> for Jens.

The patch look OK to me. But I have not received it, nor do I see it in
linux-ide list. Please resend it to me and linux-ide so that I can apply
it together with other libata fixes.

> 
> Thanks.
> 
> Marek
Marek Behún Feb. 24, 2022, 11:43 p.m. UTC | #5
On Fri, 25 Feb 2022 07:33:48 +0900
Damien Le Moal <damien.lemoal@opensource.wdc.com> wrote:

> On 2/25/22 00:37, Marek Behún wrote:
> > On Thu, 24 Feb 2022 08:14:58 -0700
> > Jens Axboe <axboe@kernel.dk> wrote:
> >   
> >> On 2/24/22 8:13 AM, Marek Beh?n wrote:  
> >>> Dear Jens,
> >>>
> >>> could you please send Ack for this patch?
> >>> https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/
> >>>
> >>> It is a revert of another patch that was added because of potential
> >>> problems in comphy driver, and these are now solved by this series, but
> >>> Vinod says he can apply the ATA patch but he needs your Ack.    
> >>
> >> I'm not maintaining libata anymore, adding Damien who's the new
> >> maintainer. Leaving email below.  
> > 
> > Dear Damien,
> > could you look at this revert and give your Ack? See the quoted message
> > for Jens.  
> 
> The patch look OK to me. But I have not received it, nor do I see it in
> linux-ide list. Please resend it to me and linux-ide so that I can apply
> it together with other libata fixes.

Dear Damien,

this needs to be applied only after the first two patches of that
series are applied via linux-phy, so we would like all of them to get
applied by Vinod via linux-phy if possible. If you're not comfortable
with that please let me know and we'll try another solution.

I can bounce the patch to linux-ide. Should I also bounce the whole
series, or that patch only?

Marek
Damien Le Moal Feb. 25, 2022, 1:11 a.m. UTC | #6
On 2/25/22 08:43, Marek Behún wrote:
> On Fri, 25 Feb 2022 07:33:48 +0900
> Damien Le Moal <damien.lemoal@opensource.wdc.com> wrote:
> 
>> On 2/25/22 00:37, Marek Behún wrote:
>>> On Thu, 24 Feb 2022 08:14:58 -0700
>>> Jens Axboe <axboe@kernel.dk> wrote:
>>>   
>>>> On 2/24/22 8:13 AM, Marek Beh?n wrote:  
>>>>> Dear Jens,
>>>>>
>>>>> could you please send Ack for this patch?
>>>>> https://lore.kernel.org/linux-phy/20220203214444.1508-4-kabel@kernel.org/
>>>>>
>>>>> It is a revert of another patch that was added because of potential
>>>>> problems in comphy driver, and these are now solved by this series, but
>>>>> Vinod says he can apply the ATA patch but he needs your Ack.    
>>>>
>>>> I'm not maintaining libata anymore, adding Damien who's the new
>>>> maintainer. Leaving email below.  
>>>
>>> Dear Damien,
>>> could you look at this revert and give your Ack? See the quoted message
>>> for Jens.  
>>
>> The patch look OK to me. But I have not received it, nor do I see it in
>> linux-ide list. Please resend it to me and linux-ide so that I can apply
>> it together with other libata fixes.
> 
> Dear Damien,
> 
> this needs to be applied only after the first two patches of that
> series are applied via linux-phy, so we would like all of them to get
> applied by Vinod via linux-phy if possible. If you're not comfortable
> with that please let me know and we'll try another solution.
> 
> I can bounce the patch to linux-ide. Should I also bounce the whole
> series, or that patch only?

Got it. Then feel free to add:

Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

But in the future, please CC me and linux-ide on patches touching ATA
code/drivers.

> 
> Marek
diff mbox series

Patch

diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index eeac5482f1d1..a57d90dd4964 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -240,8 +240,6 @@  enum {
 							as default lpm_policy */
 	AHCI_HFLAG_SUSPEND_PHYS		= (1 << 26), /* handle PHYs during
 							suspend/resume */
-	AHCI_HFLAG_IGN_NOTSUPP_POWER_ON	= (1 << 27), /* ignore -EOPNOTSUPP
-							from phy_power_on() */
 	AHCI_HFLAG_NO_SXS		= (1 << 28), /* SXS not supported */
 
 	/* ap->flags bits */
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 3ad46d26d9d5..d4bba3ace45d 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -227,7 +227,7 @@  static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {
 
 static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
 	.plat_config = ahci_mvebu_armada_3700_config,
-	.flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
+	.flags = AHCI_HFLAG_SUSPEND_PHYS,
 };
 
 static const struct of_device_id ahci_mvebu_of_match[] = {
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 18296443ccba..b26755bdc9d6 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -59,7 +59,7 @@  int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
 		}
 
 		rc = phy_power_on(hpriv->phys[i]);
-		if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
+		if (rc) {
 			phy_exit(hpriv->phys[i]);
 			goto disable_phys;
 		}