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?