Messages in this thread Patch in this message | | | Date | Tue, 23 Mar 1999 11:17:29 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: modem not hanging up since 2.2.2 |
| |
On Tue, 23 Mar 1999, brent verner wrote:
> i thought this problem might have been some strange > occurence, but i've seen it with 2.2.2 2.2.3 and 2.2.3-ac2. > after about 3 days, my modem will not hang up. i've never > had problems with this modem (diamond supra 56) until the > last couple of weeks. any suggestions? what can i do to > provide more useful info? > > thanks. > brent >
Yes. I have a patch which I supplied about a month ago. Here it is again.
--- linux-2.2.3/drivers/char/serial.c.orig Tue Mar 9 10:43:33 1999 +++ linux-2.2.3/drivers/char/serial.c Tue Mar 9 11:10:07 1999 @@ -2162,39 +2162,26 @@ { struct async_struct *info = (struct async_struct *)tty->driver_data; unsigned long flags; - - if ( (tty->termios->c_cflag == old_termios->c_cflag) - && ( RELEVANT_IFLAG(tty->termios->c_iflag) - == RELEVANT_IFLAG(old_termios->c_iflag))) - return; - - change_speed(info, old_termios); - /* Handle transition to B0 status */ - if ((old_termios->c_cflag & CBAUD) && - !(tty->termios->c_cflag & CBAUD)) { - info->MCR &= ~(UART_MCR_DTR|UART_MCR_RTS); - save_flags(flags); cli(); - serial_out(info, UART_MCR, info->MCR); - restore_flags(flags); - } - - /* Handle transition away from B0 status */ - if (!(old_termios->c_cflag & CBAUD) && - (tty->termios->c_cflag & CBAUD)) { - info->MCR |= UART_MCR_DTR; - if (!(tty->termios->c_cflag & CRTSCTS) || - !test_bit(TTY_THROTTLED, &tty->flags)) { - info->MCR |= UART_MCR_RTS; - } - save_flags(flags); cli(); - serial_out(info, UART_MCR, info->MCR); - restore_flags(flags); + /* If the speed is not B0, set it and enable DTR and possibly RTS */ + if(tty->termios->c_cflag & CBAUD) { + change_speed(info, old_termios); + info->MCR |= UART_MCR_DTR; + if (!(tty->termios->c_cflag & CRTSCTS) || + !test_bit(TTY_THROTTLED, &tty->flags)) { + info->MCR |= UART_MCR_RTS; + } + } + else { + /* The speed is B0, clear DTR and RTS */ + info->MCR &= ~(UART_MCR_DTR|UART_MCR_RTS); } + save_flags(flags); cli(); + serial_out(info, UART_MCR, info->MCR); + restore_flags(flags); /* Handle turning off CRTSCTS */ - if ((old_termios->c_cflag & CRTSCTS) && - !(tty->termios->c_cflag & CRTSCTS)) { + if (!(tty->termios->c_cflag & CRTSCTS)) { tty->hw_stopped = 0; rs_start(tty); }
Cheers, Dick Johnson ***** FILE SYSTEM WAS MODIFIED ***** Penguin : Linux version 2.2.3 on an i686 machine (400.59 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- 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/
| |