if (s->chan_rx)
                sci_rx_dma_release(s, false);
 }
-#else
+
+static void sci_flush_buffer(struct uart_port *port)
+{
+       /*
+        * In uart_flush_buffer(), the xmit circular buffer has just been
+        * cleared, so we have to reset tx_dma_len accordingly.
+        */
+       to_sci_port(port)->tx_dma_len = 0;
+}
+#else /* !CONFIG_SERIAL_SH_SCI_DMA */
 static inline void sci_request_dma(struct uart_port *port)
 {
 }
 static inline void sci_free_dma(struct uart_port *port)
 {
 }
-#endif
+
+#define sci_flush_buffer       NULL
+#endif /* !CONFIG_SERIAL_SH_SCI_DMA */
 
 static irqreturn_t sci_rx_interrupt(int irq, void *ptr)
 {
        .break_ctl      = sci_break_ctl,
        .startup        = sci_startup,
        .shutdown       = sci_shutdown,
+       .flush_buffer   = sci_flush_buffer,
        .set_termios    = sci_set_termios,
        .pm             = sci_pm,
        .type           = sci_type,