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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,668 Views
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

Labels (6)
1 Solution
921 Views
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?

View solution in original post

2 Replies
921 Views
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 Views
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?