msm_serial_hs : Disable UART interrupts till set_termios is completed

Set_termios() is called to set required baud rate and UART protocol
configuration. It also flushes previously queued Rx cmd to DMA engine
(i.e. BAM Lite). If any UART interrupts (e.g. Rx Stale ) is received
before flushing Rx cmd to DMA engine, used state machine is not able
to handle the situation and devices crashes with BUG_ON condition in
msm_hs_shutdown(). Hence disable interrupts as set_termios() is called
and enables only when returning from the same.

CRs-Fixed: 449227
Change-Id: I0696d5a26cf644d7793739c8ca1f0ea6e285bf94
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c
index fd866e1..4b6ba67 100644
--- a/drivers/tty/serial/msm_serial_hs.c
+++ b/drivers/tty/serial/msm_serial_hs.c
@@ -855,6 +855,7 @@
 	struct sps_pipe *sps_pipe_handle = rx->prod.pipe_handle;
 
 	mutex_lock(&msm_uport->clk_mutex);
+	msm_hs_write(uport, UARTDM_IMR_ADDR, 0);
 
 	/*
 	 * Disable Rx channel of UARTDM
@@ -947,7 +948,6 @@
 
 	uport->read_status_mask = (termios->c_cflag & CREAD);
 
-	msm_hs_write(uport, UARTDM_IMR_ADDR, 0);
 
 	/* Set Transmit software time out */
 	uart_update_timeout(uport, c_cflag, bps);