Fwd: Issues with parity error handling in s3c2410 serial driver

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

 



Hello all,

I think I have found some issues with the handling of parity errors in the
s3c2410 serial driver (drivers/tty/serial/samsung.c)

1.
The driver defines S3C2410_UERSTAT_PARITY as 0x1000
(see http://lxr.free-electrons.com/source/drivers/tty/serial/samsung.c#L265)

However, at least in the S3C2440, the correct value should be 0x02.
This matches the definition in include/linux/serial_s3c.h for the S3C2443 (see
http://lxr.free-electrons.com/source/include/linux/serial_s3c.h#L165)

2.
The driver currently contains code to detect parity errors, but this code is
guarded by the following check:

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. I think that this is a
bug and that S3C2410_UERSTAT_ANY should also contain the parity bit

3.
The code that detects parity errors does not increment the parity error
counter in the serial_icounter_struct structure. Other errors (framing and
overrun) are accounted for -- it is just the parity error that is not traced
(see http://lxr.free-electrons.com/source/drivers/tty/serial/samsung.c#L277).

This means that parity errors will not be reported via the TIOCGICOUNT
ioctl call.


Can someone comment on the above?

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@xxxxxxxxx
--
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