[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190622.161829.532888207521796213.davem@davemloft.net>
Date: Sat, 22 Jun 2019 16:18:29 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: weifeng.voon@...el.com
Cc: mcoquelin.stm32@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, joabreu@...opsys.com,
peppe.cavallaro@...com, andrew@...n.ch, f.fainelli@...il.com,
alexandre.torgue@...com, boon.leong.ong@...el.com
Subject: Re: [net v1] net: stmmac: fixed new system time seconds value
calculation
From: Voon Weifeng <weifeng.voon@...el.com>
Date: Wed, 19 Jun 2019 22:13:48 +0800
> From: Roland Hii <roland.king.guan.hii@...el.com>
>
> When ADDSUB bit is set, the system time seconds field is calculated as
> the complement of the seconds part of the update value.
>
> For example, if 3.000000001 seconds need to be subtracted from the
> system time, this field is calculated as
> 2^32 - 3 = 4294967296 - 3 = 0x100000000 - 3 = 0xFFFFFFFD
>
> Previously, the 0x100000000 is mistakenly written as 100000000.
>
> This is further simplified from
> sec = (0x100000000ULL - sec);
> to
> sec = -sec;
>
> Fixes: ba1ffd74df74 ("stmmac: fix PTP support for GMAC4")
> Signed-off-by: Roland Hii <roland.king.guan.hii@...el.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@...el.com>
> Signed-off-by: Voon Weifeng <weifeng.voon@...el.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists