public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] serial: core: Fix serial device initialization
@ 2025-12-19 15:28 Alexander Stein
  2025-12-21  8:40 ` Greg Kroah-Hartman
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alexander Stein @ 2025-12-19 15:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko
  Cc: Alexander Stein, linux-kernel, linux-serial, Cosmin Tanislav

During restoring sysfs fwnode information the information of_node_reused
was dropped. This was previously set by device_set_of_node_from_dev().
Add it back manually

Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/tty/serial/serial_base_bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
index 8e891984cdc0d..1e1ad28d83fcf 100644
--- a/drivers/tty/serial/serial_base_bus.c
+++ b/drivers/tty/serial/serial_base_bus.c
@@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
 	dev->parent = parent_dev;
 	dev->bus = &serial_base_bus_type;
 	dev->release = release;
+	dev->of_node_reused = true;
 
 	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
 
-- 
2.43.0


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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-19 15:28 [PATCH 1/1] serial: core: Fix serial device initialization Alexander Stein
@ 2025-12-21  8:40 ` Greg Kroah-Hartman
  2025-12-21  8:59   ` Cosmin Tanislav
  2025-12-22 11:03   ` Marek Szyprowski
  2025-12-21  9:46 ` Cosmin Tanislav
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2025-12-21  8:40 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Jiri Slaby, Andy Shevchenko, linux-kernel, linux-serial,
	Cosmin Tanislav

On Fri, Dec 19, 2025 at 04:28:12PM +0100, Alexander Stein wrote:
> During restoring sysfs fwnode information the information of_node_reused
> was dropped. This was previously set by device_set_of_node_from_dev().
> Add it back manually
> 
> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  drivers/tty/serial/serial_base_bus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> index 8e891984cdc0d..1e1ad28d83fcf 100644
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
>  	dev->parent = parent_dev;
>  	dev->bus = &serial_base_bus_type;
>  	dev->release = release;
> +	dev->of_node_reused = true;
>  
>  	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>  
> -- 
> 2.43.0
> 
> 

Can I get some confirmation from people that this resolves the issue, or
should I just revert the original problem commit instead and wait for a
tested new version?

thanks,

greg k-h

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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-21  8:40 ` Greg Kroah-Hartman
@ 2025-12-21  8:59   ` Cosmin Tanislav
  2025-12-21  9:21     ` Greg Kroah-Hartman
  2025-12-22 11:03   ` Marek Szyprowski
  1 sibling, 1 reply; 8+ messages in thread
From: Cosmin Tanislav @ 2025-12-21  8:59 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alexander Stein
  Cc: Jiri Slaby, Andy Shevchenko, linux-kernel, linux-serial



On 12/21/25 10:40 AM, Greg Kroah-Hartman wrote:
> On Fri, Dec 19, 2025 at 04:28:12PM +0100, Alexander Stein wrote:
>> During restoring sysfs fwnode information the information of_node_reused
>> was dropped. This was previously set by device_set_of_node_from_dev().
>> Add it back manually
>>
>> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
>> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>> ---
>>   drivers/tty/serial/serial_base_bus.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
>> index 8e891984cdc0d..1e1ad28d83fcf 100644
>> --- a/drivers/tty/serial/serial_base_bus.c
>> +++ b/drivers/tty/serial/serial_base_bus.c
>> @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
>>   	dev->parent = parent_dev;
>>   	dev->bus = &serial_base_bus_type;
>>   	dev->release = release;
>> +	dev->of_node_reused = true;
>>   
>>   	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>>   
>> -- 
>> 2.43.0
>>
>>
> 
> Can I get some confirmation from people that this resolves the issue, or
> should I just revert the original problem commit instead and wait for a
> tested new version?
> 

Hi Greg. I confirmed that this fixes the issue before I suggested the
fix. :D

> thanks,
> 
> greg k-h


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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-21  8:59   ` Cosmin Tanislav
@ 2025-12-21  9:21     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2025-12-21  9:21 UTC (permalink / raw)
  To: Cosmin Tanislav
  Cc: Alexander Stein, Jiri Slaby, Andy Shevchenko, linux-kernel,
	linux-serial

On Sun, Dec 21, 2025 at 10:59:52AM +0200, Cosmin Tanislav wrote:
> 
> 
> On 12/21/25 10:40 AM, Greg Kroah-Hartman wrote:
> > On Fri, Dec 19, 2025 at 04:28:12PM +0100, Alexander Stein wrote:
> > > During restoring sysfs fwnode information the information of_node_reused
> > > was dropped. This was previously set by device_set_of_node_from_dev().
> > > Add it back manually
> > > 
> > > Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
> > > Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
> > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > ---
> > >   drivers/tty/serial/serial_base_bus.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> > > index 8e891984cdc0d..1e1ad28d83fcf 100644
> > > --- a/drivers/tty/serial/serial_base_bus.c
> > > +++ b/drivers/tty/serial/serial_base_bus.c
> > > @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
> > >   	dev->parent = parent_dev;
> > >   	dev->bus = &serial_base_bus_type;
> > >   	dev->release = release;
> > > +	dev->of_node_reused = true;
> > >   	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
> > > -- 
> > > 2.43.0
> > > 
> > > 
> > 
> > Can I get some confirmation from people that this resolves the issue, or
> > should I just revert the original problem commit instead and wait for a
> > tested new version?
> > 
> 
> Hi Greg. I confirmed that this fixes the issue before I suggested the
> fix. :D

Great, can you respond with a tested-by?

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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-19 15:28 [PATCH 1/1] serial: core: Fix serial device initialization Alexander Stein
  2025-12-21  8:40 ` Greg Kroah-Hartman
@ 2025-12-21  9:46 ` Cosmin Tanislav
  2025-12-23 10:43 ` Michael Walle
  2025-12-24  7:10 ` Jingyi Wang
  3 siblings, 0 replies; 8+ messages in thread
From: Cosmin Tanislav @ 2025-12-21  9:46 UTC (permalink / raw)
  To: Alexander Stein, Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko
  Cc: linux-kernel, linux-serial



On 12/19/25 5:28 PM, Alexander Stein wrote:
> During restoring sysfs fwnode information the information of_node_reused
> was dropped. This was previously set by device_set_of_node_from_dev().
> Add it back manually
> 
> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>


Tested-by: Cosmin Tanislav <demonsingur@gmail.com>

> ---
>   drivers/tty/serial/serial_base_bus.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> index 8e891984cdc0d..1e1ad28d83fcf 100644
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
>   	dev->parent = parent_dev;
>   	dev->bus = &serial_base_bus_type;
>   	dev->release = release;
> +	dev->of_node_reused = true;
>   
>   	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>   


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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-21  8:40 ` Greg Kroah-Hartman
  2025-12-21  8:59   ` Cosmin Tanislav
@ 2025-12-22 11:03   ` Marek Szyprowski
  1 sibling, 0 replies; 8+ messages in thread
From: Marek Szyprowski @ 2025-12-22 11:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alexander Stein
  Cc: Jiri Slaby, Andy Shevchenko, linux-kernel, linux-serial,
	Cosmin Tanislav

On 21.12.2025 09:40, Greg Kroah-Hartman wrote:
> On Fri, Dec 19, 2025 at 04:28:12PM +0100, Alexander Stein wrote:
>> During restoring sysfs fwnode information the information of_node_reused
>> was dropped. This was previously set by device_set_of_node_from_dev().
>> Add it back manually
>>
>> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
>> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>> ---
>>   drivers/tty/serial/serial_base_bus.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
>> index 8e891984cdc0d..1e1ad28d83fcf 100644
>> --- a/drivers/tty/serial/serial_base_bus.c
>> +++ b/drivers/tty/serial/serial_base_bus.c
>> @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
>>   	dev->parent = parent_dev;
>>   	dev->bus = &serial_base_bus_type;
>>   	dev->release = release;
>> +	dev->of_node_reused = true;
>>   
>>   	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>>   
>> -- 
>> 2.43.0
>>
>>
> Can I get some confirmation from people that this resolves the issue, or
> should I just revert the original problem commit instead and wait for a
> tested new version?

I came to the same fix in my analysis, see 
https://lore.kernel.org/all/361ad06d-0478-40f9-9894-6f53d7b27eff@samsung.com/ 


This patch fixes the boot break on most of my test systems.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-19 15:28 [PATCH 1/1] serial: core: Fix serial device initialization Alexander Stein
  2025-12-21  8:40 ` Greg Kroah-Hartman
  2025-12-21  9:46 ` Cosmin Tanislav
@ 2025-12-23 10:43 ` Michael Walle
  2025-12-24  7:10 ` Jingyi Wang
  3 siblings, 0 replies; 8+ messages in thread
From: Michael Walle @ 2025-12-23 10:43 UTC (permalink / raw)
  To: Alexander Stein, Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko
  Cc: linux-kernel, linux-serial, Cosmin Tanislav

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On Fri Dec 19, 2025 at 4:28 PM CET, Alexander Stein wrote:
> During restoring sysfs fwnode information the information of_node_reused
> was dropped. This was previously set by device_set_of_node_from_dev().
> Add it back manually
>
> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Tested-by: Michael Walle <mwalle@kernel.org>

Thanks,
-michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

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

* Re: [PATCH 1/1] serial: core: Fix serial device initialization
  2025-12-19 15:28 [PATCH 1/1] serial: core: Fix serial device initialization Alexander Stein
                   ` (2 preceding siblings ...)
  2025-12-23 10:43 ` Michael Walle
@ 2025-12-24  7:10 ` Jingyi Wang
  3 siblings, 0 replies; 8+ messages in thread
From: Jingyi Wang @ 2025-12-24  7:10 UTC (permalink / raw)
  To: Alexander Stein, Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko
  Cc: linux-kernel, linux-serial, Cosmin Tanislav



On 12/19/2025 11:28 PM, Alexander Stein wrote:
> During restoring sysfs fwnode information the information of_node_reused
> was dropped. This was previously set by device_set_of_node_from_dev().
> Add it back manually
> 
> Fixes: 24ec03cc5512 ("serial: core: Restore sysfs fwnode information")
> Suggested-by: Cosmin Tanislav <demonsingur@gmail.com>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  drivers/tty/serial/serial_base_bus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/tty/serial/serial_base_bus.c b/drivers/tty/serial/serial_base_bus.c
> index 8e891984cdc0d..1e1ad28d83fcf 100644
> --- a/drivers/tty/serial/serial_base_bus.c
> +++ b/drivers/tty/serial/serial_base_bus.c
> @@ -74,6 +74,7 @@ static int serial_base_device_init(struct uart_port *port,
>  	dev->parent = parent_dev;
>  	dev->bus = &serial_base_bus_type;
>  	dev->release = release;
> +	dev->of_node_reused = true;
>  
>  	device_set_node(dev, fwnode_handle_get(dev_fwnode(parent_dev)));
>  

This can fix the broken serial on the Qualcomm Kaanapali device on the latest tag.

Thanks,
Jingyi

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

end of thread, other threads:[~2025-12-24  7:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-19 15:28 [PATCH 1/1] serial: core: Fix serial device initialization Alexander Stein
2025-12-21  8:40 ` Greg Kroah-Hartman
2025-12-21  8:59   ` Cosmin Tanislav
2025-12-21  9:21     ` Greg Kroah-Hartman
2025-12-22 11:03   ` Marek Szyprowski
2025-12-21  9:46 ` Cosmin Tanislav
2025-12-23 10:43 ` Michael Walle
2025-12-24  7:10 ` Jingyi Wang

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