lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 10 Sep 2014 14:15:41 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	Johannes Thumshirn <johannes.thumshirn@....de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] tty: serial: men_z135_uart: Fix driver for changes
 in hardware

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ