public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
       [not found] <d84baa5d-a092-3647-8062-ed7081d329d4@draconx.ca>
@ 2024-03-22  5:15 ` Tony Lindgren
  2024-03-22  6:36   ` Nick Bowler
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2024-03-22  5:15 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel, sparclinux, regressions, linux-serial

Hi,

* Nick Bowler <nbowler@draconx.ca> [240322 04:29]:
> I bisected to this commit:
> 
>   commit 45a3a8ef81291b63a2b50a1a145857dd9fc05e89
>   Author: Tony Lindgren <tony@atomide.com>
>   Date:   Mon Nov 13 10:07:53 2023 +0200
>   
>       serial: core: Revert checks for tx runtime PM state
> 
> Reverting this commit on top of Linux 6.8 is sufficient to get the
> system booting again.

Thanks a lot for bisecting and reporting the issue.

Can you please test if the following change to add back the check for
!pm_runtime_active() is enough to fix the issue?

Regards,

Tony

8< -----------------------
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state)
 	 * enabled, serial_port_runtime_resume() calls start_tx() again
 	 * after enabling the device.
 	 */
-	if (pm_runtime_active(&port_dev->dev))
+	if (!pm_runtime_enabled(&port_dev->dev) || pm_runtime_active(&port_dev->dev))
 		port->ops->start_tx(port);
 	pm_runtime_mark_last_busy(&port_dev->dev);
 	pm_runtime_put_autosuspend(&port_dev->dev);
-- 
2.44.0

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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-22  5:15 ` PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8 Tony Lindgren
@ 2024-03-22  6:36   ` Nick Bowler
  2024-03-22  6:48     ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Bowler @ 2024-03-22  6:36 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, sparclinux, regressions, linux-serial

On 2024-03-22 01:15, Tony Lindgren wrote:
> * Nick Bowler <nbowler@draconx.ca> [240322 04:29]:
>> I bisected to this commit:
>> 
>>   commit 45a3a8ef81291b63a2b50a1a145857dd9fc05e89
>>   Author: Tony Lindgren <tony@atomide.com>
>>   Date:   Mon Nov 13 10:07:53 2023 +0200
>>   
>>       serial: core: Revert checks for tx runtime PM state
>> 
>> Reverting this commit on top of Linux 6.8 is sufficient to get the
>> system booting again.
> 
> Thanks a lot for bisecting and reporting the issue.
> 
> Can you please test if the following change to add back the check for
> !pm_runtime_active() is enough to fix the issue?

I applied the below patch on top of 6.8 and unfortunately it does _not_
fix the problem (no obvious change in behaviour).

Thanks,
  Nick

> 8< -----------------------
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state)
>  	 * enabled, serial_port_runtime_resume() calls start_tx() again
>  	 * after enabling the device.
>  	 */
> -	if (pm_runtime_active(&port_dev->dev))
> +	if (!pm_runtime_enabled(&port_dev->dev) || pm_runtime_active(&port_dev->dev))
>  		port->ops->start_tx(port);
>  	pm_runtime_mark_last_busy(&port_dev->dev);
>  	pm_runtime_put_autosuspend(&port_dev->dev);

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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-22  6:36   ` Nick Bowler
@ 2024-03-22  6:48     ` Tony Lindgren
  2024-03-22  9:06       ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2024-03-22  6:48 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel, sparclinux, regressions, linux-serial

* Nick Bowler <nbowler@draconx.ca> [240322 06:36]:
> On 2024-03-22 01:15, Tony Lindgren wrote:
> > Can you please test if the following change to add back the check for
> > !pm_runtime_active() is enough to fix the issue?
> 
> I applied the below patch on top of 6.8 and unfortunately it does _not_
> fix the problem (no obvious change in behaviour).

Hmm OK thanks for testing. I'll take a look and see if I can debug this
with qemu sparc as I no longer have any sparc boxes around.

Regards,

Tony



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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-22  6:48     ` Tony Lindgren
@ 2024-03-22  9:06       ` Tony Lindgren
  2024-03-22 14:12         ` Nick Bowler
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2024-03-22  9:06 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel, sparclinux, regressions, linux-serial

* Tony Lindgren <tony@atomide.com> [240322 08:48]:
> * Nick Bowler <nbowler@draconx.ca> [240322 06:36]:
> > On 2024-03-22 01:15, Tony Lindgren wrote:
> > > Can you please test if the following change to add back the check for
> > > !pm_runtime_active() is enough to fix the issue?
> > 
> > I applied the below patch on top of 6.8 and unfortunately it does _not_
> > fix the problem (no obvious change in behaviour).
> 
> Hmm OK thanks for testing. I'll take a look and see if I can debug this
> with qemu sparc as I no longer have any sparc boxes around.

I can't reproduce this on qemu-system-sparc64, probably as it does not use
the sunsab driver.

I noticed something though, I think we need to test for the port device
instead for being runtime PM enabled.

Can you please test if the updated patch below make things work again?

Regards,

Tony

8< -------------------
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state)
 	 * enabled, serial_port_runtime_resume() calls start_tx() again
 	 * after enabling the device.
 	 */
-	if (pm_runtime_active(&port_dev->dev))
+	if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
 		port->ops->start_tx(port);
 	pm_runtime_mark_last_busy(&port_dev->dev);
 	pm_runtime_put_autosuspend(&port_dev->dev);
-- 
2.44.0

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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-22  9:06       ` Tony Lindgren
@ 2024-03-22 14:12         ` Nick Bowler
  2024-03-23  6:49           ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Bowler @ 2024-03-22 14:12 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-kernel, sparclinux, regressions, linux-serial

On 2024-03-22 05:06, Tony Lindgren wrote:
[...]
> I can't reproduce this on qemu-system-sparc64, probably as it does not use
> the sunsab driver.
> 
> I noticed something though, I think we need to test for the port device
> instead for being runtime PM enabled.
> 
> Can you please test if the updated patch below make things work again?

Yes, with the below patch applied on top of 6.8 things are working.

Thanks,
  Nick

> 8< -------------------
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state)
>  	 * enabled, serial_port_runtime_resume() calls start_tx() again
>  	 * after enabling the device.
>  	 */
> -	if (pm_runtime_active(&port_dev->dev))
> +	if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
>  		port->ops->start_tx(port);
>  	pm_runtime_mark_last_busy(&port_dev->dev);
>  	pm_runtime_put_autosuspend(&port_dev->dev)

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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-22 14:12         ` Nick Bowler
@ 2024-03-23  6:49           ` Tony Lindgren
  2024-03-25  7:39             ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2024-03-23  6:49 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel, sparclinux, regressions, linux-serial

* Nick Bowler <nbowler@draconx.ca> [240322 14:12]:
> On 2024-03-22 05:06, Tony Lindgren wrote:
> [...]
> > I can't reproduce this on qemu-system-sparc64, probably as it does not use
> > the sunsab driver.
> > 
> > I noticed something though, I think we need to test for the port device
> > instead for being runtime PM enabled.
> > 
> > Can you please test if the updated patch below make things work again?
> 
> Yes, with the below patch applied on top of 6.8 things are working.

OK great thanks for testing, I'll send out a proper patch.

Regards,

Tony

> > 8< -------------------
> > diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> > --- a/drivers/tty/serial/serial_core.c
> > +++ b/drivers/tty/serial/serial_core.c
> > @@ -156,7 +156,7 @@ static void __uart_start(struct uart_state *state)
> >  	 * enabled, serial_port_runtime_resume() calls start_tx() again
> >  	 * after enabling the device.
> >  	 */
> > -	if (pm_runtime_active(&port_dev->dev))
> > +	if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
> >  		port->ops->start_tx(port);
> >  	pm_runtime_mark_last_busy(&port_dev->dev);
> >  	pm_runtime_put_autosuspend(&port_dev->dev)

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

* Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8
  2024-03-23  6:49           ` Tony Lindgren
@ 2024-03-25  7:39             ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2024-03-25  7:39 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-kernel, sparclinux, regressions, linux-serial

* Tony Lindgren <tony@atomide.com> [240323 08:49]:
> * Nick Bowler <nbowler@draconx.ca> [240322 14:12]:
> > Yes, with the below patch applied on top of 6.8 things are working.
> 
> OK great thanks for testing, I'll send out a proper patch.

For reference, patch posted now at [0] below.

Regards,

Tony

[0] https://lore.kernel.org/linux-serial/20240325071649.27040-1-tony@atomide.com/T/#u

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

end of thread, other threads:[~2024-03-25  7:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <d84baa5d-a092-3647-8062-ed7081d329d4@draconx.ca>
2024-03-22  5:15 ` PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8 Tony Lindgren
2024-03-22  6:36   ` Nick Bowler
2024-03-22  6:48     ` Tony Lindgren
2024-03-22  9:06       ` Tony Lindgren
2024-03-22 14:12         ` Nick Bowler
2024-03-23  6:49           ` Tony Lindgren
2024-03-25  7:39             ` Tony Lindgren

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