Messages in this thread | | | Date | Tue, 17 Jun 2008 05:50:09 -0500 (CDT) | From | "R.L. Horn" <> | Subject | Re: 2.6.25.3: serial problem (minicom) |
| |
On Mon, 16 Jun 2008, Alan Cox wrote:
> Whatever it implies the behaviour should not have changed between 2.6.24 > and 2.6.25.
Okay, I think I may have figured this out.
serial8250_set_termios() (8250.c) gets a baud rate using uart_get_baud_rate() (serial_core.c) which returns 9600 if the termios rate is B0.
The function does some stuff.
Right before returning, it calls tty_termios_encode_baud_rate() with the abovementioned rate. That function obediently changes the c_cflag baud bits from B0 to B9600. Presumably, this causes confusion in other functions (they never know that B0 was set).
I've now changed:
tty_termios_encode_baud_rate(termios, baud, baud);
to:
if ((termios->c_cflag & CBAUD) == B0) baud = 0; tty_termios_encode_baud_rate(termios, baud, baud);
And everybody's happy, I guess.
It looks like the DECstation DZ driver (drivers/serial/dz.c) will have the same problem, but I believe the others are okay (as of 2.6.25.6).
| |