+ count = dma->rx_size - state.residue - dma->rx_index;
+ tty_insert_flip_string(tty_port, dma->rx_buf + dma->rx_index, count);
+ p->port.icount.rx += count;
+ dma->rx_index = dma->rx_size - state.residue;
+
+ tty_flip_buffer_push(tty_port);
+
+ /* RDI can be enable again, so that dma transfer can be restarted */
+ p->ier |= (UART_IER_RLSI | UART_IER_RDI);
+ p->port.read_status_mask |= UART_LSR_DR;
+ serial_port_out(&p->port, UART_IER, p->ier);
+
+ spin_unlock_irqrestore(&p->port.lock, flags);
+}
+
+void __dma_rx_timer_callback(unsigned long param)
+{
+ struct uart_8250_port *p = (struct uart_8250_port *)param;
+ struct uart_8250_dma *dma = p->dma;
+ struct tty_port *tty_port = &p->port.state->port;
+ struct dma_tx_state state;
+ int count;
+ unsigned long flags;
+
+ if (dma->rx_running == 0)
+ return;
+
+ spin_lock_irqsave(&p->port.lock, flags);
+ dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);