Re: [PATCH] jsm: fixing termios structure to be compatible withstty application

From: Alan Cox
Date: Wed Sep 30 2009 - 16:30:34 EST


> +
> + 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/