On Tue, Sep 25, 2012 at 8:48 PM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Fri, Sep 21, 2012 at 9:56 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote: >> >> Caller passes BOTHER and actual bit rate - we return BOTHER and a bit >> rate >> >> Caller does not pass BOTHER (may not be TCGETS2 aware) we snap to the >> nearest Bfoo rate if within 5% otherwise we return BOTHER based rates. > > OK sorry for getting this backwards, so I was under the impression that > BOTHER was an internal detail of the TTY layer, not to be or:ed on > and passed in from the outside. OK not I got it working thusly: /* * Make sure the core will not snap baudrate to something * "close to" requested rate by setting the BOTHER * (baud rate other) flag. */ tty->termios->c_cflag &= ~CBAUD; tty->termios->c_cflag |= BOTHER | (BOTHER >> IBSHIFT); tty_encode_baud_rate(tty, baud, baud); There are no in-kernel consumers doing this wicked thing so mailing it here for reference. Hope I got it right now... Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html