diff options
| author | Ruchika Kharwar <ruchika@ti.com> | 2012-09-06 08:45:34 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-06 12:17:02 -0400 |
| commit | 0324a821029e1f54e7a7f8fed48693cfce42dc0e (patch) | |
| tree | 91686d0187b43c8b73ca0a701a907a23542168ff | |
| parent | 52c5513d5925554d1e22288525bcb7d25fa98b16 (diff) | |
serial: omap: unlock the port lock
This patch unlocks the port lock before calling a serial_core API
and re-acquires the port lock after calling it.
This patch fixes a system freeze issue seen when the serial_core
API uart_write_wakeup() eventually attempts to acquire the port lock
already acquired by omap serial interrupt handler.
Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Vijay Badawadagi <bvijay@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index d244163c99db..9e4419ca3028 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
| @@ -224,8 +224,11 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr) | |||
| 224 | break; | 224 | break; |
| 225 | } while (--count > 0); | 225 | } while (--count > 0); |
| 226 | 226 | ||
| 227 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 227 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) { |
| 228 | spin_unlock(&up->port.lock); | ||
| 228 | uart_write_wakeup(&up->port); | 229 | uart_write_wakeup(&up->port); |
| 230 | spin_lock(&up->port.lock); | ||
| 231 | } | ||
| 229 | 232 | ||
| 230 | if (uart_circ_empty(xmit)) | 233 | if (uart_circ_empty(xmit)) |
| 231 | serial_omap_stop_tx(&up->port); | 234 | serial_omap_stop_tx(&up->port); |
