[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1345717983-18179-18-git-send-email-balbi@ti.com>
Date: Thu, 23 Aug 2012 13:32:57 +0300
From: Felipe Balbi <balbi@...com>
To: alan@...ux.intel.com
Cc: Tony Lindgren <tony@...mide.com>, Kevin Hilman <khilman@...com>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Linux ARM Kernel Mailing List
<linux-arm-kernel@...ts.infradead.org>,
linux-serial@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Shubhrajyoti Datta <shubhrajyoti@...com>,
Sourav Poddar <sourav.poddar@...com>,
Ruchika Kharwar <ruchika@...com>,
Pavan Savoy <pavan_savoy@...com>,
Vijay Badawadagi <bvijay@...com>, Felipe Balbi <balbi@...com>
Subject: [PATCH v3 17/23] serial: omap: unlock the port lock
From: Ruchika Kharwar <ruchika@...com>
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@...com>
Signed-off-by: Ruchika Kharwar <ruchika@...com>
Signed-off-by: Pavan Savoy <pavan_savoy@...com>
Signed-off-by: Vijay Badawadagi <bvijay@...com>
Signed-off-by: Felipe Balbi <balbi@...com>
---
drivers/tty/serial/omap-serial.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index ba22247..e871635 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -223,8 +223,11 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr)
break;
} while (--count > 0);
- if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+ if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
+ spin_unlock(&up->port.lock);
uart_write_wakeup(&up->port);
+ spin_lock(&up->port.lock);
+ }
if (uart_circ_empty(xmit))
serial_omap_stop_tx(&up->port);
--
1.7.12.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists