8250 fix for unconfigured FIFO size
PATCH 1/1 8250 fix for unconfigured FIFO size
Hi,
In the 8250 driver, for a serial port manually configured by setserial (not using autoconfig), the FIFO size and the TX load size do not get set. The attached patch fixes that. During UART startup, it sanitizes the FIFO size and the TX load size.
This might also fix Alexandre Courbot's problem (which I suspect is due to the old FIFO size being remembered):
Quoted 2 lines
Subject: Bug with 2.6 serial driver when in UART 8250 mode
Date: Thu, 19 Aug 2004 18:53:49 +0200
Signed-off-by Ian Abbott <[email protected]>
drivers/serial/8250.c +8 -0
@@ -1359,6 +1359,14 @@ up->capabilities = uart_config[up->port.type].flags; up->mcr =0 ; +if (up->port.fifosize <=0 || + up->port.fifosize > uart_config[up->port.type].fifo_size) + up->port.fifosize = uart_config[up->port.type].fifo_size; +if (up->tx_loadsz ==0 ) + up->tx_loadsz = uart_config[up->port.type].tx_loadsz; +if (up->tx_loadsz > up->port.fifosize) + up->tx_loadsz = up->port.fifosize; +if (up->port.type ==PORT_16C950 ) {/* Wake up and initialize UART */ up->acr =0 ;