The function size_fifo wants to backup the FCR register by reading it, but it is a write-only register. A read to this adress returns the IIR register. The size_fifo function is only used during autoconfig, and after autoconfig the FIFO are cleared and deactivated, so we don't need to save FCR. Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@xxxxxxxxxxx> ________________________________________________ Message sent using UebiMiau 2.7.9
diff -Naur linux-2.6.18_bugs/drivers/serial/8250.c linux-2.6.18_fixes/drivers/serial/8250.c --- linux-2.6.18_bugs/drivers/serial/8250.c 2006-10-06 09:45:26.000000000 +0200 +++ linux-2.6.18_fixes/drivers/serial/8250.c 2006-10-06 09:30:14.000000000 +0200 @@ -539,13 +539,12 @@ */ static int size_fifo(struct uart_8250_port *up) { - unsigned char old_fcr, old_mcr, old_lcr; + unsigned char old_mcr, old_lcr; unsigned short old_dl; int count; old_lcr = serial_inp(up, UART_LCR); serial_outp(up, UART_LCR, 0); - old_fcr = serial_inp(up, UART_FCR); old_mcr = serial_inp(up, UART_MCR); serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); @@ -560,7 +559,6 @@ for (count = 0; (serial_inp(up, UART_LSR) & UART_LSR_DR) && (count < 256); count++) serial_inp(up, UART_RX); - serial_outp(up, UART_FCR, old_fcr); serial_outp(up, UART_MCR, old_mcr); serial_outp(up, UART_LCR, UART_LCR_DLAB); serial_dl_write(up, old_dl);