Re: New serial card development

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-10-23, Theodore Ts'o <tytso@xxxxxxx> wrote:
> On Tue, Oct 23, 2012 at 06:45:51PM +0000, Grant Edwards wrote:

>> FWIW, in some products we're planning that will require support for
>> various industrial serial protocols, I'm leaning towards abandoning
>> the tty driver approach and writing a stand-alone character device
>> driver.  The byte-stream oriented tty/line-discipline layer just
>> doesn't fit well when dealing with frame-oriented industrial protocols
>> that depend on things like 9th bit addressing and detecting
>> sub-millisecond inter-byte timeouts.  
>
> You might want to take a look at how the ppp line discipline (which
> is obviously highly packet oriented) works.  One advantage of doing
> things that way is if you have a multiport serial card, where some
> ports want to play this packet-oriented approach, and other cards
> might be connected to a traditional modem or terminal sort of device,
> you won't have to figure out how to share a PCI board between two
> different drivers, allocating one port to the traditional tty/serial
> driver, and another one to your new driver, etc.

Thanks for the suggestion.  I did look into line-disciplines briefly
quite a while back. Most of the information I found implied that
adding a line disciplilne wasn't something you could do at run-time by
loading a user-built module -- it would require recompiling parts of
the kernel.  Articles made statements about having to modify kernel
include files like tty.h. If that's wrong, then a line discipline
might be a good option.

-- 
Grant Edwards               grant.b.edwards        Yow! I'm having a
                                  at               quadrophonic sensation
                              gmail.com            of two winos alone in a
                                                   steel mill!

--
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


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux