Re: [Linuxptp-users] Synchronization fault with stmmac
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Mohamed B. <mbe...@ad...> - 2014-03-25 13:38:38
|
Richard, Thank you for the insight on the kernel ptp management. As I stated, the driver was corrected and ptp4l is working correctly. There is no more issue on this part. I also do realize it is not related to the problems I had with stmmac. This is for my knowledge of linux ptp driver, stmmac driver, testptp and ptp4l. So please let me rephrase since my words may have been confusing. The only "issue" remaining is the one I mentioned with the max ppb and testptp. Considering that the drivers sets the max adj to 62,500,000, I should be able to set the ppb ajustment up/down to -+62,500,000 from my understanding. However, when printing the value passed to the driver with testptp I get: Value passed to testptp | Value printed at the entry of the driver function > +32,768,000 | -32,768,000 < -32,768,000 | -32,768,000 This explains why I asked you if it is handled in the kernel (as I did not find such a code snippet in drivers/ptp). From what you told me it seems to be in ptp4l, I will have a look. Please excuse me if it is a misunderstanding on my part. > On Tue, Mar 25, 2014 at 09:52:32AM +0100, Mohamed Belaouad wrote: > > > To sum up, the ppb adjustment passed to the driver is limited to > > [-32,768,000 | 32,768,000] and when passing values > 32,768,000 it > > saturates to -32,768,000. > > Why are you passing values greater than what the device can handle? > That doesn't make sense to do, and we don't do it in ptp4l. > > > Also, what we would like to know is: is the max ppb adjustment check > > done in the PTP subsystem (I have not found anything about it in > > drivers/ptp, maybe wrong location?) or should it be handled in the > > driver? > > There is no check in the kernel. I guess that ptp_clock_adjtime could > return ERANGE in such a case. > > You do realize that all of this has nothing to do with your stmmac > troubles, don't you? Thanks & Best Regards, Mohamed |