linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Matt Schulte <matts@commtech-fastcom.com>, linux-serial@vger.kernel.org
Subject: Re: New serial card development
Date: Mon, 15 Oct 2012 22:32:26 -0400	[thread overview]
Message-ID: <20121016023226.GA17446@thunk.org> (raw)
In-Reply-To: <20121016002608.64b33de5@pyramind.ukuu.org.uk>

On Tue, Oct 16, 2012 at 12:26:08AM +0100, Alan Cox wrote:
> > That sounds reasonable but I am not sure what you mean my the "method
> > documented in the Exar data sheet."  I've been through this thing
> > quite a bit and I don't see anything about how one might detect the
> > ports without the PCI id numbers.  Could you explain what you mean by
> > this?
> 
> I don't believe you can identify the new Exars except by PCI id - which
> is fine as the type can be passed via the 8250_pci driver.

Yeah, I just checked out the data sheet, and it looks like there isn't
a way to do this.  That's unfortunate, since board vendors can change
the PCI vendor and device ID.  So if they reprogram the EEPROM to use
their own id numbers, we won't be able to support that new board
without modifying the kernel source.  This is why I had tried to
implement ways where if the PCI class indicated a 16550 compatible
port, we would try to probe the UART registers to figure out exactly
what type of advanced features beyond those supported by the standard
16550A UART.  Sigh, it looks like we won't be able to do things that
way.

> > * I need to change two UART specific registers to change the sampling
> > mode (16x, 8x and 4x).
> 
> What determines this.

We have support for things like this already; see
serial8250_get_divisor and UPF_MAGIC_MULTIPLIER.  In general you only
want to change the sampling mode when you need it (i.e, for the high
speed baud rates).

> They should provide the basics.
> 
> > * I need to be able to enable 9-bit mode, what they call Normal
> > Multi-drop as well as the Auto Address Detection Mode used in
> > conjunction with the Multi-drop mode.
> 
> That may actually be the most "fun" bit - the entire Linux tty layer is
> devoutly 5-8bit, although people do some horrible hacks with  "8 plus
> parity".

That's what is actually recommended by the Exar application note;
since setting the 9th bit is only used for indicating that the lower 8
bits is the "address" bit for demultiplexing destination "drop", you
don't need to do it very often compared to the data bytes.  So
toggling the parity bit is the best way to deal with the fact you can
only use outb to send 8 bits.

						- Ted


  reply	other threads:[~2012-10-16  2:32 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09 18:43 New serial card development Matt Schulte
2012-10-14  9:37 ` Theodore Ts'o
2012-10-15 19:08   ` Matt Schulte
2012-10-15 23:26     ` Alan Cox
2012-10-16  2:32       ` Theodore Ts'o [this message]
2012-10-17 20:24         ` Matt Schulte
2012-10-19 21:21           ` Theodore Ts'o
2012-10-23 16:27             ` Matt Schulte
2012-10-23 16:31               ` Matt Schulte
2012-10-23 18:38                 ` Greg KH
2012-10-29 20:04                   ` Matt Schulte
2012-10-31 21:55                     ` Matt Schulte
2012-11-01 22:03                       ` Matt Schulte
2012-11-01 22:26                         ` Alan Cox
2012-11-02 18:47                           ` Matt Schulte
2012-11-02 20:21                             ` Alan Cox
2012-10-23 18:06               ` Grant Edwards
2012-10-23 18:26                 ` Alan Cox
2012-10-23 18:45                   ` Grant Edwards
2012-10-23 19:16                     ` Greg KH
2012-10-23 19:42                       ` Grant Edwards
2012-10-23 20:10                         ` Greg KH
2012-10-23 19:24                     ` Alan Cox
2012-10-23 19:48                       ` Grant Edwards
2012-10-23 20:31                     ` Theodore Ts'o
2012-10-23 20:41                       ` Grant Edwards
     [not found]       ` <CAJp1Oe6k7NWqdbYkJnd787JiT55-wSbG+tX1tP7Cy-oPShdVaA@mail.gmail.com>
2012-10-17 20:23         ` Matt Schulte
2012-10-17 21:53           ` 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=20121016023226.GA17446@thunk.org \
    --to=tytso@mit.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-serial@vger.kernel.org \
    --cc=matts@commtech-fastcom.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;
as well as URLs for NNTP newsgroup(s).