Title: [7399] branches/2009R1/drivers/serial/bfin_sport_uart.c: Bug[#5544] Waiting loop to stop SPORT uart TX blocks SPORT RX interrupt.
Revision
7399
Author
sonicz
Date
2009-09-22 00:29:04 -0400 (Tue, 22 Sep 2009)

Log Message

Bug[#5544] Waiting loop to stop SPORT uart TX blocks SPORT RX interrupt.
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: branches/2009R1/drivers/serial/bfin_sport_uart.c (7398 => 7399)


--- branches/2009R1/drivers/serial/bfin_sport_uart.c	2009-09-22 04:09:59 UTC (rev 7398)
+++ branches/2009R1/drivers/serial/bfin_sport_uart.c	2009-09-22 04:29:04 UTC (rev 7399)
@@ -263,7 +263,13 @@
 	}
 
 	if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
-		sport_stop_tx(&up->port);
+		/* The waiting loop to stop SPORT TX from TX interrupt is
+		 * too long. This may block SPORT RX interrupts and cause
+		 * RX FIFO overflow. So, do stop sport TX only after the last
+		 * char in TX FIFO is moved into the 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