Skip to content

Commit

Permalink
imx-serial-excessive-status-clearing-on-break.patch
Browse files Browse the repository at this point in the history
cc: Sasha Hauer <kernel@pengutronix.de>

We noticed that we were only able to communicate once with a GSM module
per session, if we powered down the module then the serial driver was
broken until reset, no traffic or /proc/interrupts activity could be
seen any more.

Volker noticed it was provoked by a long "break" seen on the wire when
the RX was not driven during powerdown, we discovered we could kill the
serial driver just by forcing RX low extenally for a little while.

I saw that the processing for BREAK in the driver gets too excited and
clears down all set bits in USR2, including that a character is pending.
This stops all further characters getting processed.

The attached one-liner makes the serial driver immortal against BREAK.

Signed-off-by: Andy Green <andy.green@txtr.com>
Signed-off-by: Volker Ernst <volker.ernst@txtr.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Andy Green authored and Sascha Hauer committed Feb 16, 2010
1 parent e335c75 commit 94d32f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)

temp = readl(sport->port.membase + USR2);
if (temp & USR2_BRCD) {
writel(temp | USR2_BRCD, sport->port.membase + USR2);
writel(USR2_BRCD, sport->port.membase + USR2);
if (uart_handle_break(&sport->port))
continue;
}
Expand Down

0 comments on commit 94d32f9

Please sign in to comment.