The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
@ 2026-06-26  8:58 Myeonghun Pak
  2026-06-26 11:15 ` Niklas Cassel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Myeonghun Pak @ 2026-06-26  8:58 UTC (permalink / raw)
  To: Linus Walleij, Damien Le Moal, Niklas Cassel
  Cc: linux-ide, linux-kernel, Myeonghun Pak, Ijae Kim

gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
disables them again while keeping the clocks prepared for later bridge
start and stop operations. If gemini_setup_ide_pins() fails after that,
gemini_sata_probe() returns directly and skips the existing
out_unprep_clk unwind path.

Route the IDE pinctrl failure through out_unprep_clk so the clocks
prepared by gemini_sata_bridge_init() are unprepared before probe
fails.

Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/ata/sata_gemini.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index 582c9708275c..92984b34fd3b 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -355,7 +355,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
 	if (sg->ide_pins) {
 		ret = gemini_setup_ide_pins(dev);
 		if (ret)
-			return ret;
+			goto out_unprep_clk;
 	}
 
 	dev_info(dev, "set up the Gemini IDE/SATA nexus\n");
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
@ 2026-06-26 11:15 ` Niklas Cassel
  2026-06-26 11:32 ` Damien Le Moal
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Niklas Cassel @ 2026-06-26 11:15 UTC (permalink / raw)
  To: Myeonghun Pak
  Cc: Linus Walleij, Damien Le Moal, linux-ide, linux-kernel, Ijae Kim

On Fri, Jun 26, 2026 at 05:58:37PM +0900, Myeonghun Pak wrote:
> gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
> disables them again while keeping the clocks prepared for later bridge
> start and stop operations. If gemini_setup_ide_pins() fails after that,
> gemini_sata_probe() returns directly and skips the existing
> out_unprep_clk unwind path.
> 
> Route the IDE pinctrl failure through out_unprep_clk so the clocks
> prepared by gemini_sata_bridge_init() are unprepared before probe
> fails.
> 
> Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
>  drivers/ata/sata_gemini.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
> index 582c9708275c..92984b34fd3b 100644
> --- a/drivers/ata/sata_gemini.c
> +++ b/drivers/ata/sata_gemini.c
> @@ -355,7 +355,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
>  	if (sg->ide_pins) {
>  		ret = gemini_setup_ide_pins(dev);
>  		if (ret)
> -			return ret;
> +			goto out_unprep_clk;
>  	}
>  
>  	dev_info(dev, "set up the Gemini IDE/SATA nexus\n");
> -- 
> 2.47.1
> 

Reviewed-by: Niklas Cassel <cassel@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
  2026-06-26 11:15 ` Niklas Cassel
@ 2026-06-26 11:32 ` Damien Le Moal
  2026-06-26 11:35   ` Niklas Cassel
  2026-06-26 12:55 ` Linus Walleij
  2026-06-26 21:43 ` Damien Le Moal
  3 siblings, 1 reply; 7+ messages in thread
From: Damien Le Moal @ 2026-06-26 11:32 UTC (permalink / raw)
  To: Myeonghun Pak, Linus Walleij, Niklas Cassel
  Cc: linux-ide, linux-kernel, Ijae Kim

On 6/26/26 17:58, Myeonghun Pak wrote:
> gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
> disables them again while keeping the clocks prepared for later bridge
> start and stop operations. If gemini_setup_ide_pins() fails after that,
> gemini_sata_probe() returns directly and skips the existing
> out_unprep_clk unwind path.
> 
> Route the IDE pinctrl failure through out_unprep_clk so the clocks
> prepared by gemini_sata_bridge_init() are unprepared before probe
> fails.
> 
> Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>

One of the above 2 is redundant I think.

> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
>  drivers/ata/sata_gemini.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
> index 582c9708275c..92984b34fd3b 100644
> --- a/drivers/ata/sata_gemini.c
> +++ b/drivers/ata/sata_gemini.c
> @@ -355,7 +355,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
>  	if (sg->ide_pins) {
>  		ret = gemini_setup_ide_pins(dev);
>  		if (ret)
> -			return ret;
> +			goto out_unprep_clk;
>  	}
>  
>  	dev_info(dev, "set up the Gemini IDE/SATA nexus\n");


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26 11:32 ` Damien Le Moal
@ 2026-06-26 11:35   ` Niklas Cassel
  2026-06-26 11:38     ` Damien Le Moal
  0 siblings, 1 reply; 7+ messages in thread
From: Niklas Cassel @ 2026-06-26 11:35 UTC (permalink / raw)
  To: Damien Le Moal
  Cc: Myeonghun Pak, Linus Walleij, linux-ide, linux-kernel, Ijae Kim

On Fri, Jun 26, 2026 at 08:32:02PM +0900, Damien Le Moal wrote:
> On 6/26/26 17:58, Myeonghun Pak wrote:
> > gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
> > disables them again while keeping the clocks prepared for later bridge
> > start and stop operations. If gemini_setup_ide_pins() fails after that,
> > gemini_sata_probe() returns directly and skips the existing
> > out_unprep_clk unwind path.
> > 
> > Route the IDE pinctrl failure through out_unprep_clk so the clocks
> > prepared by gemini_sata_bridge_init() are unprepared before probe
> > fails.
> > 
> > Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
> > Co-developed-by: Ijae Kim <ae878000@gmail.com>
> > Signed-off-by: Ijae Kim <ae878000@gmail.com>
> 
> One of the above 2 is redundant I think.

The tags are correct:
https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

"Since Co-developed-by: denotes authorship, every Co-developed-by: must be
immediately followed by a Signed-off-by: of the associated co-author."



Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26 11:35   ` Niklas Cassel
@ 2026-06-26 11:38     ` Damien Le Moal
  0 siblings, 0 replies; 7+ messages in thread
From: Damien Le Moal @ 2026-06-26 11:38 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: Myeonghun Pak, Linus Walleij, linux-ide, linux-kernel, Ijae Kim

On 6/26/26 20:35, Niklas Cassel wrote:
> On Fri, Jun 26, 2026 at 08:32:02PM +0900, Damien Le Moal wrote:
>> On 6/26/26 17:58, Myeonghun Pak wrote:
>>> gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
>>> disables them again while keeping the clocks prepared for later bridge
>>> start and stop operations. If gemini_setup_ide_pins() fails after that,
>>> gemini_sata_probe() returns directly and skips the existing
>>> out_unprep_clk unwind path.
>>>
>>> Route the IDE pinctrl failure through out_unprep_clk so the clocks
>>> prepared by gemini_sata_bridge_init() are unprepared before probe
>>> fails.
>>>
>>> Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
>>> Co-developed-by: Ijae Kim <ae878000@gmail.com>
>>> Signed-off-by: Ijae Kim <ae878000@gmail.com>
>>
>> One of the above 2 is redundant I think.
> 
> The tags are correct:
> https://docs.kernel.org/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by
> 
> "Since Co-developed-by: denotes authorship, every Co-developed-by: must be
> immediately followed by a Signed-off-by: of the associated co-author."

OK.

> 
> 
> 
> Kind regards,
> Niklas


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
  2026-06-26 11:15 ` Niklas Cassel
  2026-06-26 11:32 ` Damien Le Moal
@ 2026-06-26 12:55 ` Linus Walleij
  2026-06-26 21:43 ` Damien Le Moal
  3 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2026-06-26 12:55 UTC (permalink / raw)
  To: Myeonghun Pak
  Cc: Damien Le Moal, Niklas Cassel, linux-ide, linux-kernel, Ijae Kim

On Fri, Jun 26, 2026 at 11:00 AM Myeonghun Pak <mhun512@gmail.com> wrote:

> gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
> disables them again while keeping the clocks prepared for later bridge
> start and stop operations. If gemini_setup_ide_pins() fails after that,
> gemini_sata_probe() returns directly and skips the existing
> out_unprep_clk unwind path.
>
> Route the IDE pinctrl failure through out_unprep_clk so the clocks
> prepared by gemini_sata_bridge_init() are unprepared before probe
> fails.
>
> Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

Thanks!
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors
  2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
                   ` (2 preceding siblings ...)
  2026-06-26 12:55 ` Linus Walleij
@ 2026-06-26 21:43 ` Damien Le Moal
  3 siblings, 0 replies; 7+ messages in thread
From: Damien Le Moal @ 2026-06-26 21:43 UTC (permalink / raw)
  To: Myeonghun Pak, Linus Walleij, Niklas Cassel
  Cc: linux-ide, linux-kernel, Ijae Kim

On 6/26/26 17:58, Myeonghun Pak wrote:
> gemini_sata_bridge_init() prepares and enables both SATA PCLKs, then
> disables them again while keeping the clocks prepared for later bridge
> start and stop operations. If gemini_setup_ide_pins() fails after that,
> gemini_sata_probe() returns directly and skips the existing
> out_unprep_clk unwind path.
> 
> Route the IDE pinctrl failure through out_unprep_clk so the clocks
> prepared by gemini_sata_bridge_init() are unprepared before probe
> fails.
> 
> Fixes: d872ced29d5f ("ata: sata_gemini: Introduce explicit IDE pin control")
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>

Applied to for-7.2-fixes. Thanks!

-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-06-26 21:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26  8:58 [PATCH] ata: sata_gemini: unwind clocks on IDE pinctrl errors Myeonghun Pak
2026-06-26 11:15 ` Niklas Cassel
2026-06-26 11:32 ` Damien Le Moal
2026-06-26 11:35   ` Niklas Cassel
2026-06-26 11:38     ` Damien Le Moal
2026-06-26 12:55 ` Linus Walleij
2026-06-26 21:43 ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox