2014-05-07 18:33 GMT+02:00 Guillermo Rodriguez Garcia
<[email protected]>:
> Hi all,
>
> I noticed that the serial driver for the s3c2440 does detect parity
> errors, but does not increment the corresponding error counter in the

I correct myself. The driver currently does NOT properly detect parity errors.
Although it contains code to do so (!), this code is protected by the following:

if (unlikely(uerstat & S3C2410_UERSTAT_ANY)) {
...
}

And the definition of S3C2410_UERSTAT_ANY in include/linux/serial_s3c.h
does not include the parity bit.

This means that the code that currently checks for parity errors in the serial
driver won't actually be run when a parity error occurs. This looks like a bug
(independent from the issue I was describing in my previous mail related to
the serial_icounter_struct structure).

Can someone comment?

Thank you,

Guillermo Rodriguez

> serial_icounter_struct structure (see drivers/tty/serial/samsung.c,
> line 277). Other errors (framing and overrun) are accounted for -- it
> is just the parity error that is not traced.
>
> This means that parity errors will not be reported via the TIOCGICOUNT
> ioctl call, and also will not show up e.g. in
> /proc/tty/driver/s3c2410_serial
>
> I wonder if there is a reason why parity errors are not being traced?
> It is strange that the three error types (parity, framing, overrun)
> are detected, but that only two are traced in serial_icounter_struct.
>
> Can anyone shed some light?
>
> Thank you,
>
> Guillermo Rodriguez Garcia
> [email protected]

Reply via email to