lkml.org 
[lkml]   [1999]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Version 2.2.3 fails to hang up modem.

Well since the patch was applied to 4 of my systems, and since
it was taken from the first, and since the entire patch was rejected,
you have either/or:

(1) Extra lines added from "auto-wrap" or:
(2) Didn't cut it just before the beginning or:
(3) A bad copy some how..

I have attached it this time, you don't have to cut it out of text.

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.
--- 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);
}
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.027 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site