daniel-p-carvalho opened a new pull request, #20207:
URL: https://github.com/apache/nuttx/pull/20207

   ## Summary
   
   Two small corrections to code that was merged before, both found while 
checking the PTP clock documentation against the code.
   
   1. `ptp_clock_dummy_getcrosststamp()` in `drivers/timers/ptp_clock_dummy.c` 
stored the seconds of the monotonic clock in the nanoseconds field of 
`monoraw`, so the monotonic time of the cross timestamp was wrong. It now 
stores the nanoseconds. The two lines above it, for the device and the 
real-time clock, already copy the right fields.
   2. In `arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c` the comment of 
`stm32_eth_ptp_convert_rxtime()` said that it converts the RX timestamp to 
`CLOCK_REALTIME`. Since #20180 the function delivers the value of the PTP 
counter of the MAC, which is the time base of `/dev/ptp0`, so the comment says 
that now. It changes no code.
   
   ## Impact
   
   The first commit changes the value that the dummy PTP clock returns in 
`monoraw` for `PTP_SYS_OFFSET_PRECISE`. Nothing else in the tree reads it. The 
second commit changes a comment only.
   
   ## Testing
   
   Both points were confirmed by reading the code. The dummy driver was 
compiled (syntax check with the ARM toolchain, no warnings) and 
`./tools/checkpatch.sh` passes for both commits. The effect of the first fix 
was not run: it only shows in the result of `PTP_SYS_OFFSET_PRECISE` on the 
dummy clock, for example in a simulator test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to