[Linuxptp-users] phc2sys[273995.639]: failed to read clock: Invalid argument
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Pham, C. <Cal...@ne...> - 2014-03-03 21:19:35
|
Hi all, I've been trying to run phc2sys but it kept print this message on the screen and the system clock was found not able to sync to /dev/ptp0. My command was: ./phc2sys -w -s /dev/ptp0 -m phc2sys[273995.639]: failed to read clock: Invalid argument phc2sys[273996.639]: failed to read clock: Invalid argument phc2sys[273997.639]: failed to read clock: Invalid argument phc2sys[273998.639]: failed to read clock: Invalid argument phc2sys[273999.639]: failed to read clock: Invalid argument I am running kernel 3.7.5., intel I350 and linuxptp-1.4. I've found that the print messages came from the function call: clock_gettime(clkid, &tsrc) at line 106 in phc2sys.c: if (clock_gettime(sysclk, &tdst1) || clock_gettime(clkid, &tsrc) || clock_gettime(sysclk, &tdst2)) { pr_err("failed to read clock: %m"); return 0; } I forced the code to ignore the error by commenting out "return 0", phc2sys seemed to work fine; I mean the system clock was able to sync to /dev/ptp0 fine. Does anyone know why? Thanks! Calvin Pham |