Re: [PATCH 1/2] serial: imx: remove duplicate handling of CTS change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 26, 2019 at 12:15:56PM +0200, Sascha Hauer wrote:
> We have an interrupt for the CTS input (RTS in FSL speech). Its handler
> calls uart_handle_cts_change(), so we shouldn't do this in
> imx_uart_mctrl_check() again.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/imx.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index a5e80a028e83..0419a084c0ed 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -805,12 +805,8 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport);
>  static unsigned int imx_uart_get_hwmctrl(struct imx_port *sport)
>  {
>  	unsigned int tmp = TIOCM_DSR;
> -	unsigned usr1 = imx_uart_readl(sport, USR1);
>  	unsigned usr2 = imx_uart_readl(sport, USR2);
>  
> -	if (usr1 & USR1_RTSS)
> -		tmp |= TIOCM_CTS;
> -
>  	/* in DCE mode DCDIN is always 0 */
>  	if (!(usr2 & USR2_DCDIN))
>  		tmp |= TIOCM_CAR;

Is this hunk supposed to be included in this patch? I think it's wrong.

> @@ -843,8 +839,6 @@ static void imx_uart_mctrl_check(struct imx_port *sport)
>  		sport->port.icount.dsr++;
>  	if (changed & TIOCM_CAR)
>  		uart_handle_dcd_change(&sport->port, status & TIOCM_CAR);
> -	if (changed & TIOCM_CTS)
> -		uart_handle_cts_change(&sport->port, status & TIOCM_CTS);

This doesn't hurt, does it? Also imx_uart_mctrl_check is called from
imx_uart_timeout which is supposed to catch missed interrupts and in
this case uart_handle_cts_change() must be called.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux