From: Tony Lindgren <tony@atomide.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Jiri Slaby" <jirislaby@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Dhruva Gole" <d-gole@ti.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"John Ogness" <john.ogness@linutronix.de>,
"Johan Hovold" <johan@kernel.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
linux-omap@vger.kernel.org,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: core: Fix probing serial_base_bus devices
Date: Thu, 1 Jun 2023 18:07:06 +0300 [thread overview]
Message-ID: <20230601150706.GD14287@atomide.com> (raw)
In-Reply-To: <2023060112-onion-disparate-8ce8@gregkh>
* 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
next prev parent reply other threads:[~2023-06-01 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 14:14 [PATCH] serial: core: Fix probing serial_base_bus devices Tony Lindgren
2023-06-01 14:21 ` Greg Kroah-Hartman
2023-06-01 15:07 ` Tony Lindgren [this message]
2023-06-01 15:45 ` Greg Kroah-Hartman
2023-06-01 15:09 ` Marek Szyprowski
2023-06-01 15:44 ` Greg Kroah-Hartman
2023-06-01 15:46 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230601150706.GD14287@atomide.com \
--to=tony@atomide.com \
--cc=andriy.shevchenko@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=d-gole@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.