Serial driver parity support

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

 



All,

I am working to implement parity support for a serial driver.  I had several general questions about how serial drivers should handle parity and parity errors.

1. The serial driver sets TTY_DRIVER_REAL_RAW.  My understanding of  	TTY_DRIVER_REAL_RAW is that, if set, the driver will only send the 	minimum notifications of parity errors required or according to the 	c_iflags.  For example, regarding parity errors:

   ! (INPCK)         --  char with PE will be pushed as TTY_NORMAL
   INPCK & !(IGNPAR) --  char with PE will be pushed as TTY_PARITY
   INPCK & IGNPAR    --  char with PE will be discarded and not pushed

      Is my understanding correct?

2. When receiving characters, I am pushing a block of characters (<= 16) at 	a time to the TTY data structure.  If a parity error occurs on the 8th 	character, should I push the entire block of data with the TTY_PARITY 	flag?  Or should I first push the first 7 characters with the 	TTY_NORMAL flag and the 8th character separately with the TTY_PARITY 	flag?  

3. Is there a priority given to BI, FE, and PE errors?  For example, if more 	than one of these errors occurs for a single character, should all 	errors be flagged?  Or is one error given priority, and (depending on 	the c_iflag settings) the character is pushed with the flag set to 	this type of error?

4. Should I ever push the parity bit to TTY?  Or should the parity bit 	always be removed first?

Thanks in advance for your advice.

Regards,
Melissa Watkins
Texas Instruments
ARM MPU Hardware Apps
--
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