PTP Hardware Clock (PHC) algorithm is updated to support reading new PHC values.
Until this change, the driver retrieved PHC timestamp from the device's
PHC address, this change expands this API by adding 2 new values
to ena_admin_phc_resp:
1. PHC error bound:
PTP HW clock error bound refers to the maximum allowable
difference
between the clock of the device and the reference clock.
The error bound is used to ensure that the clock of the device
remains within a certain level of accuracy relative to the reference
clock. The error bound (expressed in nanoseconds) is calculated by
the device, taking into account the accuracy of all related
subsystems read delay.
Error bound (u32) may contain values of 0-4294967295 (nsec) while
driver may only report values of 0-4294967294 (nsec) because max
error bound value will be used to represent error bound read error.
The error bound value is retrieved from the device by the driver upon
every get PHC timestamp request and is cached for future retrieval by
the user.
2. PHC error flags:
Indicates on any PHC timestamp and error bound errors.
The error flags value is retrieved from the device by the driver upon
every get PHC timestamp request.
Any PHC error type will:
1. Enter the PHC into blocked state until passing blocking time
2. Return device busy error to timestamp caller
3. Return device busy error to error bound caller
This new error flags eliminates the need to check if the driver got
a bad PHC timestamp (ENA_PHC_TIMESTAMP_ERROR).
Approved by: cperciva
MFC after: 2 weeks
Sponsored by: Amazon, Inc.