Re: [EXTERNAL] net: atlantic: PHC time jumps ~4 seconds there and back on AQC107

From: Igor Russkikh
Date: Tue Aug 06 2024 - 06:05:02 EST



Hi Martin,

Sorry was on vacation so dropped out a bit.

On 7/21/2024 3:11 PM, Martin Pecka wrote:
> Thanks for the quick response, Igor.
>
>> AQC107 is now in low maintenance mode in Marvell, and you are right this are of FW is not well documented.
> Off-topic: Interesting, given the number of devices out there using AQC107...
>> One suggestion. Have you tried playing with -R (slave update rate)? Increasing it?
> Tried it now and it seems it has no clear influence. I tested with -R 10 and -R 0.1 and in neither case were the time jumps more or less frequent.
>> I have a feeling the fact it happens periodically and then restores has something to do with "rounding" or NS calculations. Surprisingly uint32 fits 4 Billions of NS which is around 4 seconds...
>
> I was also wondering whether the ~4B value could be some overflow. But the following investigation shows it is most probably not the case.

Thank you very much for the logs and the analysis.
I will try to investigate more with the data I have why this may happen.

The complex thing is that parts of ptp alignment calculations are happening in driver, and then some logic goes into the firmware/hardware.

Short term, I would say, your workaround with cutting negative mac_adj may have sense, until the real root cause is known.

Regards,
Igor