serial: tegra_hsuart: Make sure current byte rx complete in suspend

Make sure that the last byte has been received by the uart during
suspend after RTS is deasserted.

Change-Id: I3517ec058fdca912ff5ad8770d2b1c5015385385
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Colin Cross <ccross@android.com>
diff --git a/drivers/serial/tegra_hsuart.c b/drivers/serial/tegra_hsuart.c
index a7c7220..b3b8eea 100644
--- a/drivers/serial/tegra_hsuart.c
+++ b/drivers/serial/tegra_hsuart.c
@@ -599,16 +599,20 @@
 		set_rts(t, false);
 
 	if (t->rx_in_progress) {
+		wait_sym_time(t, 1); /* wait a character interval */
+
 		ier = t->ier_shadow;
 		ier &= ~(UART_IER_RDI | UART_IER_RLSI | UART_IER_RTOIE | UART_IER_EORD);
 		t->ier_shadow = ier;
 		uart_writeb(t, ier, UART_IER);
 		t->rx_in_progress = 0;
-	}
-	if (t->use_rx_dma && t->rx_dma) {
-		if (!tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req))
-			tegra_rx_dma_complete_req(t, &t->rx_dma_req);
 
+		if (t->use_rx_dma && t->rx_dma) {
+			if (!tegra_dma_dequeue_req(t->rx_dma, &t->rx_dma_req))
+				tegra_rx_dma_complete_req(t, &t->rx_dma_req);
+		} else {
+			do_handle_rx_pio(t);
+		}
 		tty_flip_buffer_push(u->state->port.tty);
 	}