Manually hold the port TX lock
authorTom Knot <tomasknot@gmail.com>
Mon, 25 Jun 2018 19:02:00 +0000 (21:02 +0200)
committerTom Knot <tomasknot@gmail.com>
Mon, 25 Jun 2018 19:02:00 +0000 (21:02 +0200)
modules/unipi/src/unipi_uart.c
version.txt

index 1dead89619ba0046c537ceb863a8037a839ce1df..7c0cd742530cbe5fcda386b52333b3b87411614c 100644 (file)
@@ -77,6 +77,7 @@ void neuronspi_uart_tx_proc(struct kthread_work *ws)
            (port->port.rs485.delay_rts_before_send > 0)) {
                msleep(port->port.rs485.delay_rts_before_send);
        }
+       spin_lock(&port->port.lock);
        neuronspi_uart_handle_tx(port);
 }
 
@@ -352,10 +353,10 @@ void neuronspi_uart_handle_tx(struct neuronspi_port *port)
        spin_unlock(&port->tx_lock);
 
        if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) {
-               spin_lock(&port->port.lock);
                uart_write_wakeup(&port->port);
-               spin_unlock(&port->port.lock);
        }
+
+       spin_unlock(&port->port.lock);
 }
 
 void neuronspi_uart_handle_irq(struct neuronspi_uart_data *uart_data, u32 portno)
index dc4c93f526a8f4bb793639dbcb027b75c56e599e..b989a461b0107463d594a7f70d6d2a66055f6187 100644 (file)
@@ -1 +1 @@
-Repository:neuron-kernel ActiveBranch:[uart_timeout] PrecedingRelease:v.0.12 PrecedingRevision:54(308ad0d) LatestCommit:Mon Jun 25 20:47:37 CEST 2018
+Repository:neuron-kernel ActiveBranch:[uart_timeout] PrecedingRelease:v.0.12 PrecedingRevision:55(3f2d211) LatestCommit:Mon Jun 25 21:02:00 CEST 2018