From: David Miller <davem@davemloft.net>
To: weifeng.voon@intel.com
Cc: mcoquelin.stm32@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, joabreu@synopsys.com,
peppe.cavallaro@st.com, andrew@lunn.ch, f.fainelli@gmail.com,
alexandre.torgue@st.com, boon.leong.ong@intel.com
Subject: Re: [net v1] net: stmmac: fixed new system time seconds value calculation
Date: Sat, 22 Jun 2019 16:18:29 -0700 (PDT) [thread overview]
Message-ID: <20190622.161829.532888207521796213.davem@davemloft.net> (raw)
In-Reply-To: <1560953628-3248-1-git-send-email-weifeng.voon@intel.com>
From: Voon Weifeng <weifeng.voon@intel.com>
Date: Wed, 19 Jun 2019 22:13:48 +0800
> From: Roland Hii <roland.king.guan.hii@intel.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@intel.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
> Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2019-06-22 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-19 14:13 [net v1] net: stmmac: fixed new system time seconds value calculation Voon Weifeng
2019-06-22 23:18 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190622.161829.532888207521796213.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexandre.torgue@st.com \
--cc=andrew@lunn.ch \
--cc=boon.leong.ong@intel.com \
--cc=f.fainelli@gmail.com \
--cc=joabreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=weifeng.voon@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox