2024-03-22 10:10:14

by Tony Lindgren

[permalink] [raw]
Subject: Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8

* Tony Lindgren <[email protected]> [240322 08:48]:
> * Nick Bowler <[email protected]> [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


2024-03-22 14:12:37

by Nick Bowler

[permalink] [raw]
Subject: Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8

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)

2024-03-23 06:49:56

by Tony Lindgren

[permalink] [raw]
Subject: Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8

* Nick Bowler <[email protected]> [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)

2024-03-25 13:33:06

by Tony Lindgren

[permalink] [raw]
Subject: Re: PROBLEM: Sun Ultra 60 hangs on boot since Linux 6.8

* Tony Lindgren <[email protected]> [240323 08:49]:
> * Nick Bowler <[email protected]> [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/[email protected]/T/#u