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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120117184047.GE22472@flint.arm.linux.org.uk>
Date:	Tue, 17 Jan 2012 18:40:48 +0000
From:	Russell King <rmk@....linux.org.uk>
To:	Shreshtha Kumar SAHU <shreshthakumar.sahu@...ricsson.com>
Cc:	gregkh@...e.de, linux-serial@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] amba-pl011: do not disable RTS during shutdown

On Tue, Jan 17, 2012 at 03:59:49PM +0530, Shreshtha Kumar SAHU wrote:
> From: Shreshtha Kumar Sahu <shreshthakumar.sahu@...ricsson.com>
> 
> In present driver, shutdown clears RTS in CR register. But the
> documentation "Documentation/serial/driver" suggests not to
> disable RTS in shutdown(). Also RTS is preserved between shutdown
> and startup calls, i.e. it is restored in startup if it was enabled
> during shutdown. So that if autorts is set and RTS is set using
> pl011_set_mctrl then it should continue even after shutdown->startup
> sequence. And hence during set_termios it will enable RTS only if RTS
> bit is set in UARTx_CR register. For throttling/unthrottling user
> should call pl011_set_mctrl.
> 
> Change-Id: I743f33fb10e7e655657cd5dae1ec585e914a65bc

Please get rid of this line.

> Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@...ricsson.com>
> Acked-by: Linus Walleij <linus.walleij@...aro.org>
> ---
>  drivers/tty/serial/amba-pl011.c |   17 ++++++++++++++++-
>  1 files changed, 16 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 6958594..46a4690 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -160,6 +160,7 @@ struct uart_amba_port {
>  	unsigned int		lcrh_tx;	/* vendor-specific */
>  	unsigned int		lcrh_rx;	/* vendor-specific */
>  	bool			autorts;
> +	bool			rts_state;	/* state during shutdown */

Do we really need a variable to track this?

>  	char			type[12];
>  	bool			interrupt_may_hang; /* vendor-specific */
>  #ifdef CONFIG_DMA_ENGINE
> @@ -1412,6 +1413,8 @@ static int pl011_startup(struct uart_port *port)
>  		barrier();
>  
>  	cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
> +	if (uap->rts_state)
> +		cr |= UART011_CR_RTS;
>  	writew(cr, uap->port.membase + UART011_CR);

Note that this should preserve DTR as well.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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