From: Jiri Slaby <jslaby@suse.cz>
To: Johannes Thumshirn <johannes.thumshirn@men.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] tty: serial: men_z135_uart: Fix driver for changes in hardware
Date: Wed, 10 Sep 2014 14:15:41 +0200 [thread overview]
Message-ID: <541040ED.1020800@suse.cz> (raw)
In-Reply-To: <1410329329-4327-1-git-send-email-johannes.thumshirn@men.de>
On 09/10/2014, 08:08 AM, Johannes Thumshirn wrote:
> * Add module parameter to configure the (baud rate dependent) RX timeout.
> Character timeout in seconds = (timeout_reg * baud_reg * 4)/freq_reg.
Buried in the log. Instead, it would be nice to have this in
MODULE_PARM_DESC.
> --- a/drivers/tty/serial/men_z135_uart.c
> +++ b/drivers/tty/serial/men_z135_uart.c
...
> @@ -118,6 +117,10 @@ static int align;
> module_param(align, int, S_IRUGO);
> MODULE_PARM_DESC(align, "Keep hardware FIFO write pointer aligned, default 0");
>
> +static int rx_timeout;
> +module_param(rx_timeout, uint, S_IRUGO);
int variable vs. uint handler.
> @@ -373,43 +376,47 @@ out:
> * @irq: The IRQ number
> * @data: Pointer to UART port
> *
> - * Check IIR register to see which tasklet to start.
> + * Check IIR register to find the cause of the interrupt and handle it.
> + * It is possible that multiple interrupts reason bits are set and reading
> + * the IIR is a destructive read, so we always need to check for all possible
> + * interrupts and handle them.
> */
> static irqreturn_t men_z135_intr(int irq, void *data)
> {
> struct men_z135_port *uart = (struct men_z135_port *)data;
> struct uart_port *port = &uart->port;
> + int handled = 0;
This can be bool or use IRQ_NONE directly.
...
> - return IRQ_HANDLED;
> + if (irq_id & MEN_Z135_IRQ_ID_RDA || irq_id & MEN_Z135_IRQ_ID_CTI) {
A matter of taste, but
irq_id & (MEN_Z135_IRQ_ID_RDA | MEN_Z135_IRQ_ID_CTI)
looks and works better.
thanks,
--
js
suse labs
prev parent reply other threads:[~2014-09-10 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 6:08 [PATCH RESEND] tty: serial: men_z135_uart: Fix driver for changes in hardware Johannes Thumshirn
2014-09-10 12:15 ` Jiri Slaby [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=541040ED.1020800@suse.cz \
--to=jslaby@suse.cz \
--cc=gregkh@linuxfoundation.org \
--cc=johannes.thumshirn@men.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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).