mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Vance <EdV@macrolink.com>
To: "'henrique.gobbi@cyclades.com'" <henrique.gobbi@cyclades.com>
Cc: root@chaos.analogic.com, linux-kernel@vger.kernel.org
Subject: RE: Interpretation of termios flags on a serial driver
Date: Thu, 27 Mar 2003 09:00:40 -0800	[thread overview]
Message-ID: <11E89240C407D311958800A0C9ACF7D1A33E09@EXCHANGE> (raw)

On Wed, Mar 26, 2003 at 7:33 AM, Henrique Gobbi wrote:
> 
> Thanks for the feedback.
> 
> > If PARENB is set you generate parity. It is ODD parity if PARODD
> > is set, otherwise it's EVEN. There is no provision to generate
> > "stick parity" even though most UARTS will do that. When you
> > generate parity, you can also ignore parity on received data if
> > you want.  This is the IGNPAR flag.
> 
> Ok. But, considering the 2 states of the flag IGNPAR, what should the 
> driver do with the chars that are receiveid with wrong 
> parity, send this 
> data to the TTY with the flag TTY_PARITY or just discard this data ?
> 
Hi Henrique,

The driver should send all characters with parity errors to the line
discipline marked with TTY_PARITY. The driver is supposed to handle the
hardware. The line discipline is supposed to handle any higher level
protocol. Ideally, the driver should not know or care about the state of
flags like IGNPAR, that are not needed to configure the hardware. 

Two common exceptions are:

1. "smart" UART hardware that directly handles some of the higher level
protocol, so the driver needs to know the higher level settings so it can
configure the hardware properly.

2. defensive actions to avoid bogging down the whole system with interrupt
storms from noisy or unconnected modem status inputs, where the driver could
mask off interrupts on modem status when the higher level options dictate
that all such status will be ignored.

Cheers,
Ed

---------------------------------------------------------------- 
Ed Vance              edv (at) macrolink (dot) com
Macrolink, Inc.       1500 N. Kellogg Dr  Anaheim, CA  92807
----------------------------------------------------------------


             reply	other threads:[~2003-03-27 16:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-27 17:00 Ed Vance [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-27 16:41 Ed Vance
2003-03-27  0:59 Ed Vance
2003-03-26 23:33 Ed Vance
2003-03-27  0:17 ` Henrique Gobbi
2003-03-06  0:19 Kernel Boot Speedup Ro0tSiEgE LKML
2003-03-26  9:23 ` Daniel Phillips
2003-03-26 14:51   ` Interpretation of termios flags on a serial driver Henrique Gobbi
2003-03-26 23:18     ` Richard B. Johnson
2003-03-26 15:33       ` Henrique Gobbi
2003-03-27  0:24         ` Russell King
2003-03-27  1:41         ` Richard B. Johnson
2003-03-27  1:01     ` Robert White

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=11E89240C407D311958800A0C9ACF7D1A33E09@EXCHANGE \
    --to=edv@macrolink.com \
    --cc=henrique.gobbi@cyclades.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    /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

all inboxes | Powered by JetHome®