From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Esben Haabendal" <esben@geanix.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Stefan Wahren" <wahrenst@gmx.net>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Markus Schneider-Pargmann" <msp@baylibre.com>,
"Ronald Wahl" <ronald.wahl@raritan.com>,
"Udit Kumar" <u-kumar1@ti.com>,
"Griffin Kroah-Hartman" <griffin@kroah.com>,
"Rengarajan S" <rengarajan.s@microchip.com>,
"Lino Sanfilippo" <l.sanfilippo@kunbus.com>,
"Serge Semin" <fancer.lancer@gmail.com>,
linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH tty-next v3 4/6] serial: 8250: Specify console context for rs485_start/stop_tx
Date: Wed, 6 Nov 2024 16:42:23 +0100 [thread overview]
Message-ID: <ZyuOX4VVbfAFhMfV@pathway.suse.cz> (raw)
In-Reply-To: <20241025105728.602310-5-john.ogness@linutronix.de>
On Fri 2024-10-25 13:03:26, John Ogness wrote:
> For RS485 mode, if SER_RS485_RX_DURING_TX is not available, the
> console write callback needs to enable/disable TX. It does this
> by calling the rs485_start/stop_tx() callbacks. However, these
> callbacks will disable/enable interrupts, which is a problem
> for console write, as it must be responsible for
> disabling/enabling interrupts.
It is not clear to me what exactly is the problem. Is the main
problem calling pm_runtime*() API because it uses extra locks
and can cause deadlocks? Or is it more complicated?
IMHO, it would deserve some explanation.
> Add an argument @in_con to the rs485_start/stop_tx() callbacks
> to specify if they are being called from console write. If so,
> the callbacks will not handle interrupt disabling/enabling.
>
> For all call sites other than console write, there is no
> functional change.
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>
It looks like the code does what the description says. And honestly,
I do not have any idea how to improve the naming. I would keep
it as is after reading John's answers in the thread.
IMHO, one thing which makes things comlicated is that
serial8250_em485_start_tx() and serial8250_em485_stop_tx()
are not completely reversible operations. Especially,
the change done by __serial8250_stop_rx_mask_dr() is
not reverted in serial8250_em485_stop_tx(). It makes
things look tricky. But I think that it is beyond the scope
of this patchset to do anything about it.
Just 2 my cents.
Best Regaards,
Petr
next prev parent reply other threads:[~2024-11-06 15:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 10:57 [PATCH tty-next v3 0/6] convert 8250 to nbcon John Ogness
2024-10-25 10:57 ` [PATCH tty-next v3 1/6] serial: 8250: Adjust the timeout for FIFO mode John Ogness
2024-10-25 13:45 ` Andy Shevchenko
2024-10-25 13:51 ` Andy Shevchenko
2024-10-29 16:24 ` Wander Lairson Costa
2024-10-30 6:05 ` Jiri Slaby
2024-10-31 4:44 ` Maciej W. Rozycki
2024-10-31 8:49 ` John Ogness
2024-11-01 1:24 ` Maciej W. Rozycki
2024-11-01 8:21 ` Andy Shevchenko
2024-11-04 6:44 ` Jiri Slaby
2024-11-04 6:34 ` Jiri Slaby
2024-11-04 14:13 ` John Ogness
2024-12-02 6:12 ` Jiri Slaby
2024-12-02 16:41 ` John Ogness
2024-12-01 0:04 ` Maciej W. Rozycki
2024-10-25 10:57 ` [PATCH tty-next v3 2/6] serial: 8250: Use high-level write function for FIFO John Ogness
2024-10-25 13:50 ` Andy Shevchenko
2024-11-05 16:12 ` Petr Mladek
2024-10-25 10:57 ` [PATCH tty-next v3 3/6] serial: 8250: Split out rx stop/start code into helpers John Ogness
2024-10-25 13:55 ` Andy Shevchenko
2024-11-06 10:54 ` Petr Mladek
2024-10-25 10:57 ` [PATCH tty-next v3 4/6] serial: 8250: Specify console context for rs485_start/stop_tx John Ogness
2024-10-25 14:04 ` Andy Shevchenko
2024-10-25 14:25 ` John Ogness
2024-10-25 14:34 ` Andy Shevchenko
2024-10-30 6:13 ` Jiri Slaby
2024-10-31 9:13 ` John Ogness
2024-11-06 15:42 ` Petr Mladek [this message]
2024-11-29 17:45 ` John Ogness
2024-10-25 10:57 ` [PATCH tty-next v3 5/6] serial: 8250: Switch to nbcon console John Ogness
2024-10-25 14:22 ` Andy Shevchenko
2024-10-28 13:22 ` John Ogness
2024-11-07 9:48 ` Petr Mladek
2024-10-30 6:33 ` Jiri Slaby
2024-10-31 9:25 ` John Ogness
2024-10-25 10:57 ` [PATCH tty-next v3 6/6] serial: 8250: Revert "drop lockdep annotation from serial8250_clear_IER()" John Ogness
2024-10-25 14:05 ` Andy Shevchenko
2024-10-25 13:58 ` [PATCH tty-next v3 0/6] convert 8250 to nbcon 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=ZyuOX4VVbfAFhMfV@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=esben@geanix.com \
--cc=fancer.lancer@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=griffin@kroah.com \
--cc=jirislaby@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=khilman@baylibre.com \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=paulmck@kernel.org \
--cc=rengarajan.s@microchip.com \
--cc=rjui@broadcom.com \
--cc=ronald.wahl@raritan.com \
--cc=rostedt@goodmis.org \
--cc=sbranden@broadcom.com \
--cc=senozhatsky@chromium.org \
--cc=tglx@linutronix.de \
--cc=u-kumar1@ti.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=wahrenst@gmx.net \
/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.