Messages in this thread | | | Date | Wed, 30 Sep 2009 21:31:40 +0100 | From | Alan Cox <> | Subject | Re: [PATCH] jsm: fixing termios structure to be compatible with stty application |
| |
> + > + termios->c_ispeed = termios->c_cflag & CBAUD; > + termios->c_ospeed = termios->c_cflag & CBAUD; > +
NAK
termios->c_ispeed/ospeed are the actual baud rates not bit encodings, and are used for devices that support arbitary speeds
Use
tty_termios_encode_baudrate(termios, ispeed, ospeed);
where ispeed/ospeed are actual input and output baud.
It does all the hard work and knows about
- keeping requests for traditional style B38400 type requests in their native form (so a request for 38400 that comes out at 38100 will still get encoded as B38400) - Encoding arbitary rates using BOTHER - Handling platforms that haven't been updated properly.
The patch you posted is a nonsense patch so if it helps it might be worth looking harder as to why..
Alan
| |