From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
linux-serial@vger.kernel.org, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH v1] serial: imx: Initialize lock for non-registered console
Date: Mon, 25 May 2020 17:41:07 +0200 [thread overview]
Message-ID: <20200525154107.GA1016976@kroah.com> (raw)
In-Reply-To: <20200525153418.GE1634618@smile.fi.intel.com>
On Mon, May 25, 2020 at 06:34:18PM +0300, Andy Shevchenko wrote:
> On Mon, May 25, 2020 at 04:07:52PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, May 25, 2020 at 07:01:13AM -0700, Guenter Roeck wrote:
> > > On 5/25/20 3:59 AM, Andy Shevchenko wrote:
> > > > The commit a3cb39d258ef
> > > > ("serial: core: Allow detach and attach serial device for console")
> > > > changed a bit logic behind lock initialization since for most of the console
> > > > driver it's supposed to have lock already initialized even if console is not
> > > > enabled. However, it's not the case for Freescale IMX console.
> > > >
> > > > Initialize lock explicitly in the ->probe().
> > > >
> > > > Note, there is still an open question should or shouldn't not this driver
> > > > register console properly.
> > > >
> > > > Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")
> > > > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > >
> > > I really wonder if this is the correct fix, especially since it looks like
> > > there are several other drivers which don't call register_console() either
> > > but implement a console device.
> > >
> > > Guenter
> > >
> > > > ---
> > > > drivers/tty/serial/imx.c | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> > > > index 986d902fb7fe..6b078e395931 100644
> > > > --- a/drivers/tty/serial/imx.c
> > > > +++ b/drivers/tty/serial/imx.c
> > > > @@ -2404,6 +2404,9 @@ static int imx_uart_probe(struct platform_device *pdev)
> > > > }
> > > > }
> > > >
> > > > + /* We need to initialize lock even for non-registered console */
> > > > + spin_lock_init(&sport->port.lock);
> >
> > Why are we having to do this for all console drivers recently?
> > Shouldn't the original patch that required this gone through and fixed
> > up all drivers?
> >
> > I'm with Guenter here, let's fix them all at once please.
>
> Okay. Do you want series per driver or one for all?
one per driver is always easier to apply :)
thanks,
greg k-h
next prev parent reply other threads:[~2020-05-25 15:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 10:59 [PATCH v1] serial: imx: Initialize lock for non-registered console Andy Shevchenko
2020-05-25 14:01 ` Guenter Roeck
2020-05-25 14:07 ` Greg Kroah-Hartman
2020-05-25 14:38 ` Guenter Roeck
2020-05-25 15:34 ` Andy Shevchenko
2020-05-25 15:41 ` Greg Kroah-Hartman [this message]
2020-05-25 15:52 ` Andy Shevchenko
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=20200525154107.GA1016976@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-serial@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).