[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1398265117-11793-3-git-send-email-balbi@ti.com>
Date: Wed, 23 Apr 2014 09:58:27 -0500
From: Felipe Balbi <balbi@...com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: <marcel@...tmann.org>, <gustavo@...ovan.org>,
<johan.hedberg@...il.com>, <jslaby@...e.cz>,
<grant.likely@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
<linux-bluetooth@...r.kernel.org>, <linux-serial@...r.kernel.org>,
<devicetree@...r.kernel.org>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Tony Lindgren <tony@...mide.com>, Felipe Balbi <balbi@...com>
Subject: [PATCH 03/13] Revert "serial: omap: unlock the port lock"
This reverts commit 0324a821029e1f54e7a7f8fed48693cfce42dc0e.
That commit tried to fix a deadlock problem when using
hci_ldisc, but it turns out the bug was in hci_ldsic
all along where it was calling ->write() from within
->write_wakeup() callback.
The problem is that ->write_wakeup() was called with
port lock held and ->write() tried to grab the same
port lock.
Signed-off-by: Felipe Balbi <balbi@...com>
---
drivers/tty/serial/omap-serial.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 08b6b94..837f6c1 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -398,11 +398,8 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr)
break;
} while (--count > 0);
- if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
- spin_unlock(&up->port.lock);
+ if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(&up->port);
- spin_lock(&up->port.lock);
- }
if (uart_circ_empty(xmit))
serial_omap_stop_tx(&up->port);
--
1.9.2.459.g68773ac
--
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