linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Johan Hovold <johan@kernel.org>,
	linux-serial@vger.kernel.org, kernel@pengutronix.de,
	Steffen Trumtrar <s.trumtrar@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	regressions@lists.linux.dev
Subject: Re: [PATCH] serial: 8250: Return early in .start_tx() if there are no chars to send
Date: Mon, 11 Apr 2022 12:56:44 +0300	[thread overview]
Message-ID: <YlP7XDU8Xoq9Zl3C@atomide.com> (raw)
In-Reply-To: <Yk7muv2McT5Sjqbk@atomide.com>

* Tony Lindgren <tony@atomide.com> [220407 13:25]:
> Hi,
> 
> * Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [700101 02:00]:
> > From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> > 
> > Don't start the whole chain for TX if there is no data to send. This is
> > mostly relevant for rs485 mode as there might be rts-before-send and
> > rts-after-send delays involved.
> > 
> > Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> > Hello,
> > 
> > a few other drivers have such an early exit already (imx, stm32-usart).
> > I wonder if it applies to all UART drivers that there is nothing to do
> > in .start_tx() if the circ buffer is empty and there is no x_char to
> > send. In this case it would be more sensible to ensure in serial_core
> > that .start_tx() is only ever called if there is something to do.
> 
> This patch seems to cause a runtime PM regression in v5.18-rc1 where
> 8250 is never idled for omaps.
> 
> Looks like the return added here is not paired with put for the
> serial8250_rpm_get_tx() call above?

FYI I just posted two fixes for these early return cases:

https://lore.kernel.org/linux-serial/20220411094805.45696-1-tony@atomide.com/T/#t

Regards,

Tony

      reply	other threads:[~2022-04-11  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 21:18 [PATCH] serial: 8250: Return early in .start_tx() if there are no chars to send Uwe Kleine-König
2022-02-22  8:20 ` Jiri Slaby
2022-04-07 13:27 ` Tony Lindgren
2022-04-11  9:56   ` Tony Lindgren [this message]

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=YlP7XDU8Xoq9Zl3C@atomide.com \
    --to=tony@atomide.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=johan@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=s.trumtrar@pengutronix.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /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).