X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fserial%2F8250.c;h=2964ca9df5a010f9cebb264e4115d5a588e5c234;hb=482120084d843d4cbb7ff3eb84510a1471130ce0;hp=5261f0af8b101bcf4e1149caebdb484bbe92aa70;hpb=975a8e3ed2b9eab9f062a1e0ba7fe180e15204e1;p=linux-2.6-omap-h63xx.git diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 5261f0af8b1..2964ca9df5a 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -920,12 +920,16 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) #ifdef __i386__ outb(0xff, 0x080); #endif - scratch2 = serial_inp(up, UART_IER); + /* + * Mask out IER[7:4] bits for test as some UARTs (e.g. TL + * 16C754B) allow only to modify them if an EFR bit is set. + */ + scratch2 = serial_inp(up, UART_IER) & 0x0f; serial_outp(up, UART_IER, 0x0F); #ifdef __i386__ outb(0, 0x080); #endif - scratch3 = serial_inp(up, UART_IER); + scratch3 = serial_inp(up, UART_IER) & 0x0f; serial_outp(up, UART_IER, scratch); if (scratch2 != 0 || scratch3 != 0x0F) { /*