From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: leitao@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jsm: fixing termios structure to be compatible with stty application
Date: Wed, 30 Sep 2009 21:31:40 +0100 [thread overview]
Message-ID: <20090930213140.4172748f@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1254327512-6880-1-git-send-email-leitao@linux.vnet.ibm.com>
> +
> + 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
next prev parent reply other threads:[~2009-09-30 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 16:18 [PATCH] jsm: fixing termios structure to be compatible with stty application leitao
2009-09-30 20:31 ` Alan Cox [this message]
2009-10-01 20:34 ` Breno Leitao
2009-10-01 21:10 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090930213140.4172748f@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=leitao@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox