lkml.org 
[lkml]   [2023]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: core: Fix probing serial_base_bus devices
* Greg Kroah-Hartman <gregkh@linuxfoundation.org> [230601 14:21]:
> On Thu, Jun 01, 2023 at 05:14:44PM +0300, Tony Lindgren wrote:
> > If a physical serial port device driver uses arch_initcall() we fail to
> > probe the serial_base_bus devices and the serial port tx fails. This is
> > because as serial_base_bus uses module_initcall().
> >
> > Let's fix the issue by changing serial_base_bus to use arch_initcall().
>
> This will only work if the linking order is such that this will always
> come before the drivers. Is that the case here?

I guess based on Makefile. And also if serial drivers are modules as we
export uart_add_one_port() from serial_base.ko. But yeah this is pretty
fragile potentially.

Hmm maybe we could keep module_init() and then also call serial_base_init()
on uart_add_one_port() path if not yet initialized?

Probably the module_init() should be still there for case when no serial
port device drivers are loaded and serial_base is unloaded..

Regards,

Tony

\
 
 \ /
  Last update: 2023-06-01 17:16    [W:0.061 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site