Messages in this thread Patch in this message | | | Date | Tue, 16 Jun 1998 00:07:46 -0400 | From | "Theodore Y. Ts'o" <> | Subject | Re: Problem with serial ports <> |
| |
OK, I've taken a closer look at the problem, and here's a cleaner fix to make serial driver forgiving about illegal xmit_fifo_sizes.
- Ted
Patch generated: on Tue Jun 16 00:07:13 EDT 1998 by tytso@rsts-11.mit.edu against Linux version 2.1.105
--- drivers/char/serial.c 1998/06/16 03:56:16 1.1 +++ drivers/char/serial.c 1998/06/16 04:00:40 @@ -1661,11 +1661,15 @@ if ((new_serial.irq >= NR_IRQS) || (new_serial.port > 0xffff) || (new_serial.type < PORT_UNKNOWN) || - (new_serial.type > PORT_MAX) || - (new_serial.xmit_fifo_size == 0)) { + (new_serial.type > PORT_MAX)) { return -EINVAL; } + 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; + /* Make sure address is not already in use */ if (new_serial.type) { for (i = 0 ; i < NR_PORTS; i++) @@ -1714,9 +1718,6 @@ check_and_exit: if (!state->port || !state->type) return 0; - if (state->type != old_state.type) - info->xmit_fifo_size = state->xmit_fifo_size = - uart_config[state->type].dfl_xmit_fifo_size; if (state->flags & ASYNC_INITIALIZED) { if (((old_state.flags & ASYNC_SPD_MASK) != (state->flags & ASYNC_SPD_MASK)) || - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |