Re: New serial card development

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

 



On 2012-10-23, Matt Schulte <matts@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Oct 19, 2012 at 4:21 PM, Theodore Ts'o <tytso@xxxxxxx> wrote:
>> On Wed, Oct 17, 2012 at 03:24:06PM -0500, Matt Schulte wrote:
>>>
>>> What I would need to have happen is for a flag to be set that says
>>> "enable 9-bit mode transmit" or something.  When set, the first byte
>>> of data of a given write will go out with mark parity, then the rest
>>> of the bytes will have space parity.  The one byte with mark is the
>>> address byte.
>
>> Why not just have a userspace library routine which simply uses
>> tcgetattr/tcsetattr to toggle a bit (probably a new bit in c_cflag) in
>> struct termios, issue the single byte write, and then toggle the bit
>> back?

Can it be guaranteed that it's going to be fast enough at high
baud-rates to prevent any gap between the first byte and subsequent
bytes?

>> In Linux, system calls are fast, so using some extra ioctl's to toggle
>> the termios structure is probably the way to go.  It's also much more
>> general since it doesn't presume a very specific protocol (i.e., your
>> magic multi-drop protocol).
>
> Also this isn't a magic protocol, it is a very old protocol that is
> apparently still in use today because I have several customers still
> asking for it.

It's been pretty much a standard in the microctroller world for a
_long_ time.  I remember 9-bit HW support with special interrupt on
the "address" byte from almost 30 years ago: when I first worked with
the Intel 8051 in 1983, it had 9-bit support in it's UART (and we used
it).

I now work for a company that has manufactured PC serial boards for
25+ years, and we still get regular requests for that feature (and our
boards do support it -- though our Linux driver does not).

-- 
Grant Edwards               grant.b.edwards        Yow! I guess you guys got
                                  at               BIG MUSCLES from doing too
                              gmail.com            much STUDYING!

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