Re: 2.6.25.3: serial problem (minicom)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: R.L. Horn
Date: Tuesday, June 17, 2008 - 3:50 am

On Mon, 16 Jun 2008, Alan Cox wrote:


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).
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Fri Jun 13, 2:36 pm)
Re: 2.6.25.3: serial problem (minicom), Alan Cox, (Sat Jun 14, 2:29 am)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Sun Jun 15, 12:04 am)
Re: 2.6.25.3: serial problem (minicom), Alan Cox, (Mon Jun 16, 3:13 am)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Mon Jun 16, 9:22 pm)
Re: 2.6.25.3: serial problem (minicom), Alan Cox, (Tue Jun 17, 1:58 am)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Tue Jun 17, 3:50 am)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Tue Jun 17, 4:03 am)
Re: 2.6.25.3: serial problem (minicom), Hans-Peter Jansen, (Tue Jun 17, 5:15 pm)
Re: 2.6.25.3: serial problem (minicom), Alan Cox, (Wed Jun 18, 10:55 am)
Re: 2.6.25.3: serial problem (minicom), Olivier Galibert, (Wed Jun 18, 1:07 pm)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Thu Jun 19, 1:20 am)
Re: 2.6.25.3: serial problem (minicom), Hans-Peter Jansen, (Thu Jun 19, 4:46 pm)
Re: 2.6.25.3: serial problem (minicom), R.L. Horn, (Fri Jun 20, 4:22 am)