* + arm-imx-serial-driver-fix-resume.patch added to -mm tree
@ 2010-10-07 22:56 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-10-07 22:56 UTC (permalink / raw)
To: mm-commits; +Cc: volker.ernst, andy, daniel, greg, s.hauer
The patch titled
ARM: imx serial driver: fix resume
has been added to the -mm tree. Its filename is
arm-imx-serial-driver-fix-resume.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: ARM: imx serial driver: fix resume
From: Volker Ernst <volker.ernst@txtr.com>
I just came across a bug in the IMX31 serial driver which is still present
in the newest kernels and which prevents successful resume-operation for
the IMX31 serial ports.
What happens is that in "drivers/serial/imx.c" on resume function
"serial_imx_resume" gets called. This function in turn calls
"uart_resume_port" (in the generic serial driver "serial_core.c"), which
in turn calls "imx_start_tx" in "imx.c" (in case the SIO-port was really
suspended) which in turn calls "imx_transmit_buffer".
However calling "imx_transmit_buffer" with an empty TX-fifo (as is usually
the case) will result in the serial port starting to transmit (actually
the old [already sent] tx-buffer), as there is no check if the tx-buffer
is empty before starting to feed tx-fifo-data to the serial port hardware.
Signed-off-by: Volker Ernst <volker.ernst@txtr.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Andy Green <andy@warmcat.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/serial/imx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/serial/imx.c~arm-imx-serial-driver-fix-resume drivers/serial/imx.c
--- a/drivers/serial/imx.c~arm-imx-serial-driver-fix-resume
+++ a/drivers/serial/imx.c
@@ -328,13 +328,13 @@ static inline void imx_transmit_buffer(s
struct circ_buf *xmit = &sport->port.state->xmit;
while (!(readl(sport->port.membase + UTS) & UTS_TXFULL)) {
+ if (uart_circ_empty(xmit))
+ break;
/* send xmit->buf[xmit->tail]
* out the port here */
writel(xmit->buf[xmit->tail], sport->port.membase + URTX0);
xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
sport->port.icount.tx++;
- if (uart_circ_empty(xmit))
- break;
}
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
_
Patches currently in -mm which might be from volker.ernst@txtr.com are
arm-imx-serial-driver-fix-resume.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-07 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 22:56 + arm-imx-serial-driver-fix-resume.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.