From: Sebastian Andrzej Siewior Date: Mon, 29 Sep 2014 18:06:40 +0000 (+0200) Subject: tty: serial: 8250_dma: handle error on TX submit X-Git-Tag: omap-for-v3.19/fixes-rc1~86^2~152 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b220282156440a62d5e9e58c0aade0f0daaa374c;p=pandora-kernel.git tty: serial: 8250_dma: handle error on TX submit Right now it is possible that serial8250_tx_dma() fails and returns -EBUSY. The caller (serial8250_start_tx()) will then enable UART_IER_THRI which will generate an interrupt once the TX FIFO is empty. In serial8250_handle_irq() nothing will happen because up->dma is set and so serial8250_tx_chars() won't be invoked. We end up with plenty of interrupts and some "too much work for irq" output. This patch introduces dma_tx_err in struct uart_8250_port to signal that the last invocation of serial8250_tx_dma() failed so we can fill the TX FIFO manually. Should the next invocation of serial8250_start_tx() succeed then the dma_tx_err flag along with the THRI bit is removed and DMA only usage may continue. Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed