Re: [PATCH] serial: sh-sci: Fix HSCIF RX sampling point calculation

2019-04-04 Thread Eugeniu Rosca
Hi Geert, On Mon, Apr 01, 2019 at 01:25:10PM +0200, Geert Uytterhoeven wrote: > There are several issues with the formula used for calculating the > deviation from the intended rate: > 1. While min_err and last_stop are signed, srr and baud are unsigned. > Hence the signed values are promot

Re: [PATCH] serial: sh-sci: Fix HSCIF RX sampling point calculation

2019-04-01 Thread Ulrich Hecht
> On April 1, 2019 at 1:25 PM Geert Uytterhoeven > wrote: > > > There are several issues with the formula used for calculating the > deviation from the intended rate: > 1. While min_err and last_stop are signed, srr and baud are unsigned. > Hence the signed values are promoted to unsig

Re: [PATCH] serial: sh-sci: Fix HSCIF RX sampling point calculation

2019-04-01 Thread Mukesh Ojha
On 4/1/2019 4:55 PM, Geert Uytterhoeven wrote: There are several issues with the formula used for calculating the deviation from the intended rate: 1. While min_err and last_stop are signed, srr and baud are unsigned. Hence the signed values are promoted to unsigned, which will lead

[PATCH] serial: sh-sci: Fix HSCIF RX sampling point calculation

2019-04-01 Thread Geert Uytterhoeven
There are several issues with the formula used for calculating the deviation from the intended rate: 1. While min_err and last_stop are signed, srr and baud are unsigned. Hence the signed values are promoted to unsigned, which will lead to a bogus value of deviation if min_err is negati