[PATCH] drivers/serial/8250.c patch4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

This is a more disputable item. I believe that it is better to protect with spinlocks any fiddling in intterupt registers/variables. This patch makes it more robust (in my view).

--- drivers/serial/8250.c.orig	2007-06-11 20:37:06.000000000 +0200
+++ drivers/serial/8250.c	2007-06-19 14:54:02.000000000 +0200
@@ -1937,7 +1937,8 @@ serial8250_set_termios(struct uart_port
 	if (up->bugs & UART_BUG_QUOT && (quot & 0xff) == 0)
 		quot ++;

-	if (up->capabilities & UART_CAP_FIFO && up->port.fifosize > 1) {
+ if (up->capabilities & UART_CAP_FIFO && + uart_config[up->port.type].fifosize > 1) {
 		if (baud < 2400)
 			fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
 		else
@@ -1952,7 +1953,8 @@ serial8250_set_termios(struct uart_port
 	 * have sufficient FIFO entries for the latency of the remote
 	 * UART to respond.  IOW, at least 32 bytes of FIFO.
 	 */
-	if (up->capabilities & UART_CAP_AFE && up->port.fifosize >= 32) {
+ if (up->capabilities & UART_CAP_AFE && + uart_config[up->port.type].fifosize >= 32) {
 		up->mcr &= ~UART_MCR_AFE;
 		if (termios->c_cflag & CRTSCTS)
 			up->mcr |= UART_MCR_AFE;

regards

Kees
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux