From: Tony Lindgren <tony@atomide.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: core: Fix missing shutdown and startup for serial base port
Date: Fri, 12 Apr 2024 06:45:33 +0300 [thread overview]
Message-ID: <20240412034533.GG5153@atomide.com> (raw)
In-Reply-To: <ZhfgOU7htReGK3Xt@smile.fi.intel.com>
Hi,
* Andy Shevchenko <andriy.shevchenko@linux.intel.com> [240411 13:06]:
> On Thu, Apr 11, 2024 at 08:58:45AM +0300, Tony Lindgren wrote:
> > +out_base_port_startup:
> > + uport = uart_port_check(state);
> > + if (!uport)
> > + return -EIO;
> > +
> > + serial_base_port_startup(uport);
>
> So, we call this even on uninitialised TTY. Is it okay?
To me it seems we should do it unconditionally unless there are
reasons to tie to the TTY init logic. This should be checked
though, maybe it needs to be tied to the TTY logic.
> > /* Flush any pending TX for the port */
> > uart_port_lock_irqsave(port, &flags);
> > + if (!port_dev->tx_enabled)
> > + goto unlock;
>
> Can't this be integrated into...
>
> > if (__serial_port_busy(port))
>
> ...this call?
Yes so it seems thanks, it can be done to simplify the code.
Regards,
Tony
next prev parent reply other threads:[~2024-04-12 3:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 5:58 [PATCH] serial: core: Fix missing shutdown and startup for serial base port Tony Lindgren
2024-04-11 13:06 ` Andy Shevchenko
2024-04-12 3:45 ` Tony Lindgren [this message]
2024-04-11 14:53 ` 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=20240412034533.GG5153@atomide.com \
--to=tony@atomide.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.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