All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Awais Masood <awais.masood@vadion.com>
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, tim@xen.org, julien.grall@arm.com,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 2/2] xen/ns16550: Fix ISR lockup on Designware 8250 (H5)
Date: Tue, 19 Sep 2017 07:49:52 -0600	[thread overview]
Message-ID: <59C13CA0020000780017CD92@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1505828334-29109-3-git-send-email-awais.masood@vadion.com>

>>> On 19.09.17 at 15:38, <awais.masood@vadion.com> wrote:
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -521,6 +521,18 @@ static void ns16550_interrupt(
>              serial_tx_interrupt(port, regs);
>          if ( lsr & UART_LSR_DR )
>              serial_rx_interrupt(port, regs);
> +        if ( uart->dw_usr_bsy &&
> +             (ns_read_reg(uart, UART_IIR) & UART_IIR_BSY) == UART_IIR_BSY )
> +        {
> +            /* If DesignWare 8250 UART became busy again when LCR was written
> +             * earlier, it can raise a "busy detect" again.
> +             * Read the UART Status Register to clear this state or we'll end up
> +             * in an infinte loop because UART_IIR_NOINT is not true.
> +             * Placing this check in setup_preirq after LCR write does not work
> +             * probably due to a delayed interrupt.
> +             */
> +            ns_read_reg(uart, UART_USR);
> +        }

This same code already exists in ns16550_setup_preirq() - please
introduce a helper function. It would also help if you referred to
the commit introducing that other instance of the code, explaining
why what was done there was not enough (because pretty clearly
the author must have assumed that change to be sufficient).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-09-19 13:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 13:38 [PATCH 0/2] xen/arm64/ns16550: Support for Allwinner H5 SoC Awais Masood
2017-09-19 13:38 ` [PATCH 1/2] xen/arm64: Add Support for Allwinner H5 (sun50i) Awais Masood
2017-09-19 13:50   ` Jan Beulich
2017-09-19 13:38 ` [PATCH 2/2] xen/ns16550: Fix ISR lockup on Designware 8250 (H5) Awais Masood
2017-09-19 13:49   ` Jan Beulich [this message]
2017-09-26  9:37 ` [PATCH v2 0/2] xen/arm64/ns16550: Support for Allwinner H5 SoC Awais Masood
2017-09-26  9:37   ` [PATCH v2 1/2] xen/arm64: Add Support for Allwinner H5 (sun50i) Awais Masood
2017-09-28 20:03     ` Julien Grall
2017-09-28 22:49       ` Andre Przywara
2017-09-29 16:35         ` Andre Przywara
2017-10-04  9:16           ` Awais Masood
2017-10-04  9:26             ` Andre Przywara
2017-10-04  9:39               ` Awais Masood
2017-10-04 10:03                 ` Andre Przywara
2017-10-03 11:32         ` Julien Grall
2017-09-26  9:37   ` [PATCH v2 2/2] xen/ns16550: Fix ISR lockup on Designware 8250 (H5) Awais Masood
2017-09-26 11:58     ` Jan Beulich
2017-10-04 11:44   ` [PATCH v3] xen/ns16550: Fix ISR lockup on Allwinner uart Awais Masood
2017-10-06 14:50     ` Jan Beulich
2017-10-10 23:59     ` Stefano Stabellini

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=59C13CA0020000780017CD92@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=awais.masood@vadion.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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.