Patch for 2.2.13!!!!

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Wed, 13 Oct 1999 15:49:25 +0200 (MEST)


Hi Alan,

The following patch fixes the problem that when you change the UART
type, the kernel will install the FIFO depth of the OLD UART.

Now, this bug will rarely cause dataloss, as people will normally just
set their UART from the default (unknown UART, 1-byte FIFO)to the one
they actually have. However someone trying a few things will end up
with a not-working setup if he goes to the right setting from a chip
that happens to have a larger FIFO.

In short, the exising code is obviously wrong and should be fixed ASAP.

Alan, I think you missed this when I first posted it. I didn't check
that you picked it up until just now. Sorry.

Roger.

diff -ur linux-2.2.13pre17.clean/drivers/char/serial.c linux/drivers/char/serial.c
--- linux-2.2.13pre17.clean/drivers/char/serial.c Wed Oct 13 15:18:45 1999
+++ linux/drivers/char/serial.c Wed Oct 13 15:30:29 1999
@@ -1693,7 +1693,7 @@
if ((new_serial.type != state->type) ||
(new_serial.xmit_fifo_size <= 0))
new_serial.xmit_fifo_size =
- uart_config[state->type].dfl_xmit_fifo_size;
+ uart_config[new_serial.type].dfl_xmit_fifo_size;

/* Make sure address is not already in use */
if (new_serial.type) {

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/