[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170212184758.GA1703@localhost.localdomain>
Date:   Sun, 12 Feb 2017 19:47:58 +0100
From:   Richard Cochran <richardcochran@...il.com>
To:     "Mintz, Yuval" <Yuval.Mintz@...ium.com>
Cc:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "Kalluru, Sudarsana" <Sudarsana.Kalluru@...ium.com>
Subject: Re: [PATCH net-next v4 1/2] qed: Add infrastructure for PTP support.
On Sun, Feb 12, 2017 at 11:52:23AM +0000, Mintz, Yuval wrote:
> Just to clarify [since it's bit a meaningless otherwise] -
> this +8 is a HW-bug workaround.
Can you please explain exactly what the problem is?
Your code does
		period1 = div_s64(val * 1000000000, ppb);
		period1 -= 8;
		period1 >>= 4;
But correct rounding would be
		period1 = div_s64(val * 1000000000, ppb);
		period1 += 8;
		period1 >>= 4;
Thanks,
Richard
Powered by blists - more mailing lists
 
