Subject: Re: [PATCH net-next v4 1/2] qed: Add infrastructure for PTP support.

From: Richard Cochran <[email-masked]>
Date: Sun, 12 Feb 2017 19:47:58 +0100

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