tty/serial/imx.c miss operation when use tty set break

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

tty/serial/imx.c miss operation when use tty set break

跳至解决方案
1,668 次查看
xiongweihuang
Contributor III

Hi all

 

On current git tree ,

 

In imx.c , when operate with tty .break_ctl

 

734 static void imx_break_ctl(struct uart_port *port, int break_state)

735 {

736         struct imx_port *sport = (struct imx_port *)port;

737         unsigned long flags, temp;

738

739         spin_lock_irqsave(&sport->port.lock, flags);

740

741         temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;

742

743         if ( break_state != 0 )

744                 temp |= UCR1_SNDBRK;

 

You miss the revert back the register of UCR1_SNDBRK

 

This should be a bug , here is the patch . please check and approve

Original Attachment has been moved to: tty_imx_brk.patch.zip

标签 (6)
1 解答
921 次查看
fushi_peng
NXP Employee
NXP Employee

Your patch :

--- a/drivers/tty/serial/imx.c

+++ b/drivers/tty/serial/imx.c

@@ -739,6 +739,8 @@ static void imx_break_ctl(struct uart_port *port, int break_state)

  if ( break_state != 0 )

  temp |= UCR1_SNDBRK;

+ else

+ temp &= ~UCR1_SNDBRK;

But from original  code :

741         temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;

Is that same as your change?

在原帖中查看解决方案

2 回复数
921 次查看
YixingKong
Senior Contributor IV

Hi Xiongwei, is Fushi's reply help your question? If yes, please close the DI, oherwise please keep working with him.

Thanks,

Yixing

922 次查看
fushi_peng
NXP Employee
NXP Employee

Your patch :

--- a/drivers/tty/serial/imx.c

+++ b/drivers/tty/serial/imx.c

@@ -739,6 +739,8 @@ static void imx_break_ctl(struct uart_port *port, int break_state)

  if ( break_state != 0 )

  temp |= UCR1_SNDBRK;

+ else

+ temp &= ~UCR1_SNDBRK;

But from original  code :

741         temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;

Is that same as your change?