[PATCH 08/26] serial: sunsab: Don't enable tx if tx stopped

2014-09-02 Thread Peter Hurley
The serial core may call the UART driver's start_tx() even if
tx is stopped; the UART driver must verify tx should be enabled
before transmitting.

Reported-by: Sam Ravnborg 
cc: David S. Miller 
cc: 
Signed-off-by: Peter Hurley 
---
 drivers/tty/serial/sunsab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index c83b1c6..448a93b 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -427,7 +427,7 @@ static void sunsab_start_tx(struct uart_port *port)
struct circ_buf *xmit = >port.state->xmit;
int i;
 
-   if (uart_circ_empty(xmit))
+   if (uart_circ_empty(xmit) || uart_tx_stopped(port))
return;
 
up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 08/26] serial: sunsab: Don't enable tx if tx stopped

2014-09-02 Thread Peter Hurley
The serial core may call the UART driver's start_tx() even if
tx is stopped; the UART driver must verify tx should be enabled
before transmitting.

Reported-by: Sam Ravnborg s...@ravnborg.org
cc: David S. Miller da...@davemloft.net
cc: sparcli...@vger.kernel.org
Signed-off-by: Peter Hurley pe...@hurleysoftware.com
---
 drivers/tty/serial/sunsab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index c83b1c6..448a93b 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -427,7 +427,7 @@ static void sunsab_start_tx(struct uart_port *port)
struct circ_buf *xmit = up-port.state-xmit;
int i;
 
-   if (uart_circ_empty(xmit))
+   if (uart_circ_empty(xmit) || uart_tx_stopped(port))
return;
 
up-interrupt_mask1 = ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/