Re: ftdi_sio: no per-byte parity error detection possible?

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

 



On Fri, Oct 27, 2017 at 05:49:34PM +0200, Benjamin Valentin wrote:
> Hi,
> I'm trying to communicate with an embedded device using a serial protocol
> which uses the parity bit to indicate the start of a frame (MARK/SPACE
> parity).
> 
> Sending such frames works well, but when receiving them with a FT232RL USB
> adapter, the parity error detection is very unreliable.
> 
> I created a minimal example to reproduce this [1] with just two of these USB
> adapters. When I use the internal, 16550-compatible UART of the MT7688
> instead, parity errors are detected reliably.

Because there is more "direct control" over the uart data stream here.

> So I decided to dig deeper and indeed in ftdi_sio.c:ftdi_process_packet() I
> found that if a parity error occurs, the error flag is set for all bytes of
> the current transfer (up to 64). This of course breaks my assumption that a
> parity error would mark only the affected byte.

I think that is just the way the device works, sorry.  It is that way
for many, if not most, USB to serial adapters.

So if you really need to know the exact byte that an error occurs on, I
suggest you not use a USB to serial adapter, sorry.

good luck!

greg k-h
--
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