]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Update calculation of timeout for DMA
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Mon, 16 Mar 2015 16:19:54 +0000 (01:19 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 21:42:27 +0000 (22:42 +0100)
commit90e95b20870b08f98f2271727e251c1c9b0b0f70
tree7d7ce56d60f76674fa113e6b3d806468b49e688c
parent7d16d721c4e128a68765b2f8445e84e0b11cb514
serial: sh-sci: Update calculation of timeout for DMA

The current calculation method in the case of 9600bps, rounding error occurs
has become setting that occur timeout faster than the required time. When we
use 9600bps, 32byte buffer, 10 bit (CS8) and 100 HZ, it becomes 3 jiffies
(30msec). In fact it is necessary 33msec. This updates to the calculation
that are not actually less than the value set by the rounding error.
Also, this is nothing will be calculated value when there is no load. If there
are a lot of case load, overrun error will occur immediately.
This is by the buffer size to be calculated twice the DMA buffer, and add the
change of setting a sufficient time-out value.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c