aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-08-16 16:18:33 +0530
committerGary S. Robertson <gary.robertson@linaro.org>2013-08-19 08:46:33 -0500
commit726a88c237f0fd8510e208ea367c614e48d1fa39 (patch)
tree995d1551d928077155266b1c1b72b73c05d8b2bf
parent91f8fa012c1e9fd79f2fcd8c07fc31caeafc6848 (diff)
tty: serial: samsung: drop uart_port->lock before calling tty_flip_buffer_push()linux-lng-3.10.6-2013.08
The -rt patch triggers a lockdep warning for serial drivers if tty_flip_buffer_push() is called with uart_port->lock locked. This never shows up on UP kernels. Release the port lock before calling tty_flip_buffer_push() and reacquire it after the call. Similar stuff was already done for few other drivers in the past, like: commit 2389b272168ceec056ca1d8a870a97fa9c26e11a Author: Thomas Gleixner <tglx@linutronix.de> Date: Tue May 29 21:53:50 2007 +0100 [ARM] 4417/1: Serial: Fix AMBA drivers locking Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--drivers/tty/serial/samsung.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 0c8a9fa2be6c..aaa0df1f2fc6 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -249,6 +249,8 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
ufcon |= S3C2410_UFCON_RESETRX;
wr_regl(port, S3C2410_UFCON, ufcon);
rx_enabled(port) = 1;
+ spin_unlock_irqrestore(&port->lock,
+ flags);
goto out;
}
continue;
@@ -297,10 +299,11 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id)
ignore_char:
continue;
}
+
+ spin_unlock_irqrestore(&port->lock, flags);
tty_flip_buffer_push(&port->state->port);
out:
- spin_unlock_irqrestore(&port->lock, flags);
return IRQ_HANDLED;
}