On 11/11/2021 2:34 PM, Vladimir Oltean wrote:
> On Thu, Nov 11, 2021 at 03:55:29PM -0600, Ed Branch wrote:
>> As of commit 380d023abb1fdce0dba9d58ca1abaf2e2de5488f PHC device nodes or
>> symlinks named as "/dev/ptp*" where "*" is not a number cause phc2sys to
>> fail with "failed to parse PHC index". Note however, if the filename does
>> not match this pattern, it happily continues with no PHC index set.
> 
> That would be me and my ts2phc patches. Sorry for that. Prior to that
> change, posix_clock_open() used to simply not populate *phc_index when
> passed a path to a PHC. I don't think there's any kernel API to deduce
> the PHC number using ioctls on the char device itself, so for my use
> case it would be pretty odd to have a PTP device named differently than
> /dev/ptpN. Nonetheless, phc2sys does not need to know the exact number
> of the PTP clock, and therefore, what I can do is move the error one
> level upper, at the caller. I'll try to come up with a patch tomorrow.
> 

There aren't any methods right now, but it is something I have felt
would be useful in the past. Perhaps we can add a new field to the
PTP_CLOCK_GETCAPS2 ioctl? Or add a new IOCTL which gets this data?

I think that would be helpful for more than just this case.

Thanks,
Jake

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to