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: <20120118101013.GF22472@flint.arm.linux.org.uk>
Date:	Wed, 18 Jan 2012 10:10:13 +0000
From:	Russell King <rmk@....linux.org.uk>
To:	Shreshtha Kumar SAHU <shreshthakumar.sahu@...ricsson.com>
Cc:	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] amba-pl011: do not disable RTS during shutdown

On Wed, Jan 18, 2012 at 03:15:06PM +0530, Shreshtha Kumar SAHU wrote:
> data type of old_cr was bool in patchv2, corrected in this patchv3

This is much better, just a small little niggle with it.

> @@ -1411,7 +1412,9 @@ static int pl011_startup(struct uart_port *port)
>  	while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_BUSY)
>  		barrier();
>  
> -	cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
> +	/* restore RTS and DTR */
> +	cr = (uap->old_cr & (UART011_CR_RTS | UART011_CR_DTR));

You don't need the outer set of parens around this (additional
unnecessary parens can cause confusion when trying to read code.)

> @@ -1488,9 +1492,16 @@ static void pl011_shutdown(struct uart_port *port)
>  
>  	/*
>  	 * disable the port
> +	 * disable the port. It should not disable RTS and DTR.
> +	 * Also RTS and DTR state should be preserved to restore
> +	 * it during startup().
>  	 */
>  	uap->autorts = false;
> -	writew(UART01x_CR_UARTEN | UART011_CR_TXE, uap->port.membase + UART011_CR);
> +	cr = readw(uap->port.membase + UART011_CR);
> +	uap->old_cr = cr;
> +	cr &= (UART011_CR_RTS | UART011_CR_DTR);

Ditto.

Once those are fixed:

Acked-by: Russell King <rmk+kernel@....linux.org.uk>

-- 
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