patch-2.1.69 linux/drivers/char/serial.c
Next file: linux/drivers/char/tty_io.c
Previous file: linux/drivers/char/rocket.c
Back to the patch index
Back to the overall index
-  Lines: 31
-  Date:
Mon Dec  1 09:45:43 1997
-  Orig file: 
v2.1.68/linux/drivers/char/serial.c
-  Orig date: 
Wed Nov 26 16:24:02 1997
diff -u --recursive --new-file v2.1.68/linux/drivers/char/serial.c linux/drivers/char/serial.c
@@ -1210,6 +1210,20 @@
 	timer_active |= 1 << RS_TIMER;
 
 	/*
+	 * Set up the tty->alt_speed kludge
+	 */
+	if (info->tty) {
+		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
+			info->tty->alt_speed = 57600;
+		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
+			info->tty->alt_speed = 115200;
+		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)
+			info->tty->alt_speed = 230400;
+		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)
+			info->tty->alt_speed = 460800;
+	}
+	
+	/*
 	 * and set the speed of the serial port
 	 */
 	change_speed(info);
@@ -1376,7 +1390,8 @@
 	/* Determine divisor based on baud rate */
 	baud = tty_get_baud_rate(info->tty);
 	baud_base = info->state->baud_base;
-	if (baud == 38400)
+	if (baud == 38400 &&
+	    ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST))
 		quot = info->state->custom_divisor;
 	else {
 		if (baud == 134)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov