Re: PTP: PHY timestamping when MAC is PTP capable

2017-08-28 Thread Richard Cochran
On Mon, Aug 28, 2017 at 08:39:44AM +, Sørensen, Stefan wrote: > I have run into a problem with packet timestamping on a platform (cpsw > + dp83640) where both the PHY and the MAC is PTP capable and I need > the PHY to perform the timestamping. In the current code, > SIOCGHWTSTAMP is passed to t

Re: ptp

2016-09-07 Thread Richard Cochran
On Wed, Sep 07, 2016 at 01:55:19PM -0700, Daniel Walker wrote: > So the code only allows second granularity negative updates, No. > or the seconds > component is the only part which needs to actually be negative ? Yes. See the function, clockadj_step, in linuxptp/clockadj.c for a working user s

Re: ptp

2016-09-07 Thread Daniel Walker
On 09/07/2016 01:48 PM, Richard Cochran wrote: On Wed, Sep 07, 2016 at 01:40:59PM -0700, Daniel Walker wrote: There is a test (below) , which prevents negative nanosecond updates. The code below would force a negative update to always return more than NSEC_PER_SEC. It should be using abs() inste

Re: ptp

2016-09-07 Thread Richard Cochran
On Wed, Sep 07, 2016 at 01:40:59PM -0700, Daniel Walker wrote: > There is a test (below) , which prevents negative nanosecond updates. The > code below would force a negative update to always return more than > NSEC_PER_SEC. It should be using abs() instead which would return the value > desired.