xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Chris Patterson <cjp256@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tim@xen.org, Chris Patterson <pattersonc@ainfosec.com>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	andrew.cooper3@citrix.com,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH] ns16550: mask transmit holding register empty interrupt when tx is stopped
Date: Wed, 17 Aug 2016 13:03:51 -0400	[thread overview]
Message-ID: <CABZSBQe6Wu3m5OhmrtKHkcaE=i5n4eA8y8tMLYcd33yEGK2Rfg@mail.gmail.com> (raw)
In-Reply-To: <57B491060200007800106BCC@prv-mh.provo.novell.com>

On Wed, Aug 17, 2016 at 10:29 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 17.08.16 at 16:02, <cjp256@gmail.com> wrote:
>> From: Chris Patterson <pattersonc@ainfosec.com>
>>
>> The uart generates an interrupt whenever the transmit holding register is
>> empty and UART_IER_ETHREI is set in UART_IER.  Currently, Xen's ns16550
>> driver does not currently mask this interrupt when transmit is stopped,
>> unlike other platforms such as Linux [1].
>>
>> Toggle UART_IER_ETHREI flag in the UART_IER according to the state dictated
>> by stop_tx and start_tx hooks.
>>
>> On the Tegra platform (forthcoming series), the reset via reading IIR does not
>> prevent re-assertion of THRE.  This causes Xen to hang in the interrupt
>> handler's while loop whenever there is no data to transmit.  This behavior (bug?)
>> is addressed by utilizing the start & stop tx hooks.
>
> Looks mostly okay from a technical pov, but there are a few minor
> (mostly style) issues.
>
>> [1] http://lxr.free-electrons.com/source/drivers/tty/serial/8250/8250_port.c?v=4.7#L1518
>
> I'd appreciate for such references to be to the canonical (i.e. Linus'es)
> tree.
>
>> @@ -813,6 +813,26 @@ static int __init ns16550_irq(struct serial_port *port)
>>      return ((uart->irq > 0) ? uart->irq : -1);
>>  }
>>
>> +static void ns16550_start_tx(struct serial_port *port)
>> +{
>> +    struct ns16550 *uart = port->uart;
>> +    unsigned int ier = ns_read_reg(uart, UART_IER);
>
> Please use u8 or unsigned char here, as is done elsewhere in the file.
>
>> +    /* unmask transmit holding register empty interrupt if currently masked */
>
> Comment style: Upper case at the beginning; the full stop at the
> end has become optional recently.
>
>> +    if (!(ier & UART_IER_ETHREI))
>
> Blanks missing inside the parentheses.
>
> Jan
>

ACK, will fix these in v2.  Thank you for the review.

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

      reply	other threads:[~2016-08-17 17:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 14:02 [PATCH] ns16550: mask transmit holding register empty interrupt when tx is stopped Chris Patterson
2016-08-17 14:29 ` Jan Beulich
2016-08-17 17:03   ` Chris Patterson [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='CABZSBQe6Wu3m5OhmrtKHkcaE=i5n4eA8y8tMLYcd33yEGK2Rfg@mail.gmail.com' \
    --to=cjp256@gmail.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=pattersonc@ainfosec.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).