Title: [7393] trunk/drivers/serial/bfin_sport_uart.c: Bug[#5544] Waiting to stop SPORT uart TX from TX interrupt is too long
Revision
7393
Author
sonicz
Date
2009-09-21 06:46:40 -0400 (Mon, 21 Sep 2009)

Log Message

Bug[#5544] Waiting to stop SPORT uart TX from TX interrupt is too long
This may block SPORT RX interrupts and cause RX FIFO overflow. So, do
stop sport TX from TX interrupt only when the last char in TX FIFO is
shifted into shift register.

Modified Paths

Diff

Modified: trunk/drivers/serial/bfin_sport_uart.c (7392 => 7393)


--- trunk/drivers/serial/bfin_sport_uart.c	2009-09-21 10:36:20 UTC (rev 7392)
+++ trunk/drivers/serial/bfin_sport_uart.c	2009-09-21 10:46:40 UTC (rev 7393)
@@ -271,7 +271,13 @@
 	}
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
-		sport_stop_tx(&up->port);
+		/* Waiting loop to stop SPORT uart TX from TX interrupt is
+		 * too long. This may block SPORT RX interrupts and cause
+		 * RX FIFO overflow. So, do stop sport TX only when the last
+		 * char in TX FIFO is shifted into shift register.
+		 */
+		if (SPORT_GET_STAT(up) & TXHRE)
+			sport_stop_tx(&up->port);
 		return;
 	}
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to