From: "Roger Pau Monné" <roger.pau@citrix.com>
To: dmkhn@proton.me
Cc: xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com,
anthony.perard@vates.tech, jbeulich@suse.com, julien@xen.org,
michal.orzel@amd.com, sstabellini@kernel.org, dmukhin@ford.com
Subject: Re: [PATCH] ns16550: ensure polling timer is disarmed
Date: Wed, 6 Aug 2025 12:47:56 +0200 [thread overview]
Message-ID: <aJMy3KBPy7tjjYj3@macbook.local> (raw)
In-Reply-To: <20250730031249.1613142-1-dmukhin@ford.com>
On Wed, Jul 30, 2025 at 03:13:31AM +0000, dmkhn@proton.me wrote:
> From: Denis Mukhin <dmukhin@ford.com>
>
> As it stands, polling timer is kept in the list of timers even after the
> interrupts have been enabled / polling disabled on ns16550-compatible UART.
>
> Ensure polling timer is removed from the timer list once UART interrupts are
> enabled.
>
> Signed-off-by: Denis Mukhin <dmukhin@ford.com>
> ---
> xen/drivers/char/ns16550.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index df7fff7f81df..299773d80065 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -191,6 +191,10 @@ static void cf_check ns16550_interrupt(int irq, void *dev_id)
> struct serial_port *port = dev_id;
> struct ns16550 *uart = port->uart;
>
> + /* Ensure polling timer is disarmed and removed from the timer list. */
> + if ( !uart->intr_works )
> + kill_timer(&uart->timer);
I think if anything you should issue a stop_timer() call, but not a
kill_timer() one, otherwise the uart code will hit an ASSERT when
calling set_timer() from ns16550_setup_postirq()? (that's from
_ns16550_resume()).
Thanks, Roger.
prev parent reply other threads:[~2025-08-06 10:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 3:13 [PATCH] ns16550: ensure polling timer is disarmed dmkhn
2025-07-30 8:12 ` Jan Beulich
2025-07-30 18:31 ` dmkhn
2025-07-31 6:54 ` Jan Beulich
2025-07-31 21:42 ` dmkhn
2025-08-01 7:34 ` Jan Beulich
2025-08-06 10:53 ` Roger Pau Monné
2025-08-06 11:44 ` Jan Beulich
2025-08-06 10:47 ` Roger Pau Monné [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=aJMy3KBPy7tjjYj3@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=dmkhn@proton.me \
--cc=dmukhin@ford.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.