aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMukesh Kumar Savaliya <msavaliy@codeaurora.org>2019-10-22 11:32:27 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2019-10-23 23:02:59 -0700
commit79e070db03ba60cc3eef2c4cb84654de839d6f62 (patch)
treec66712dc86f23a170a236508e0598cd4bccb6301
parentd5fc97d3f40c3372fd6c61051f3970969c2e0c25 (diff)
serial: msm_geni_serial: Disable Flow only for HSUART usecaseLV.AU.0.0.1-15510-gen3meta.0
This change restricts disabling of Flow control and interrupts only for HSUART case. Fundamentally Console usecase need not have flow control need as part of baud rate change. Also do not touch interrupts for console usecase as it results into imbalance of the irq. Change-Id: Ic6964f5b18c8dc4223a2b2a68f16af33359b3e6e Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
-rw-r--r--drivers/tty/serial/msm_geni_serial.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/tty/serial/msm_geni_serial.c b/drivers/tty/serial/msm_geni_serial.c
index b1ce33da1f7c..21cc15364b6e 100644
--- a/drivers/tty/serial/msm_geni_serial.c
+++ b/drivers/tty/serial/msm_geni_serial.c
@@ -1907,13 +1907,13 @@ static void msm_geni_serial_set_termios(struct uart_port *uport,
__func__, ret);
return;
}
+ disable_irq(uport->irq);
+ msm_geni_serial_set_manual_flow(false, port);
}
/* Take a spinlock else stop_rx causes a race with an ISR due to Cancel
* and FSM_RESET. This also has a potential race with the dma_map/unmap
* operations of ISR.
*/
- disable_irq(uport->irq);
- msm_geni_serial_set_manual_flow(false, port);
spin_lock_irqsave(&uport->lock, flags);
msm_geni_serial_stop_rx(uport);
spin_unlock_irqrestore(&uport->lock, flags);
@@ -2017,8 +2017,10 @@ static void msm_geni_serial_set_termios(struct uart_port *uport,
IPC_LOG_MSG(port->ipc_log_misc, "BitsChar%d stop bit%d\n",
bits_per_char, stop_bit_len);
exit_set_termios:
- msm_geni_serial_set_manual_flow(true, port);
- enable_irq(uport->irq);
+ if (!uart_console(uport)) {
+ msm_geni_serial_set_manual_flow(true, port);
+ enable_irq(uport->irq);
+ }
msm_geni_serial_start_rx(uport);
if (!uart_console(uport))
msm_geni_serial_power_off(uport);