lkml.org 
[lkml]   [2008]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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).


\
 
 \ /
  Last update: 2008-06-17 12:55    [W:0.935 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site