Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cfaa553 authored by Mukesh Kumar Savaliya's avatar Mukesh Kumar Savaliya
Browse files

serial: msm_geni_serial: Disable Flow only for HSUART usecase



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: default avatarMukesh Kumar Savaliya <msavaliy@codeaurora.org>
parent b318a6e0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2006,13 +2006,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);
@@ -2116,8 +2116,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:
	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);