Re: 2.1.66 serial driver broken -- baud rates..

Niels Kristian Bech Jensen (nkbj@image.dk)
Thu, 27 Nov 1997 07:03:14 +0100 (MET)


> The 2.1.66 kernel seems to have trouble on my machine
> when setting baud rates.. I normally use setserial /dev/modem spd_vhi
> to specify 115200, but the actual rate used is more like 9600 instead.
>
> Ports are just standard motherboard stuff on an ASUS board (16550A..).
>
> Not sure where to begin looking, other than at the extensive driver
> updates in 2.1.66..
>
Does this patch solve your problem. It did for me but I don't know if it
solves the whole problem:

--- linux/drivers/char/serial.c.orig Wed Nov 26 06:55:52 1997
+++ linux/drivers/char/serial.c Thu Nov 27 06:52:18 1997
@@ -1376,7 +1376,7 @@
/* 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)

--
Med venlig hilsen / Best regards
                                                               nkbj@image.dk
Niels Kristian Bech Jensen                        http://www.image.dk/~nkbj/