[lvc-project] [PATCH net] net: dsa: sja1105: reject zero pin duration for PTP perout
Andrew Lunn
andrew at lunn.ch
Wed Jun 3 15:23:41 MSK 2026
On Wed, Jun 03, 2026 at 02:02:16PM +0300, Aleksandrova Alyona wrote:
> pin_duration is converted from the user-provided period to SJA1105
> clock ticks and is later passed as the cycle_time argument to
> future_base_time().
>
> Very small period values may become zero after the conversion,
> which can lead to a division by zero in future_base_time().
>
> Reject zero pin_duration values and values that exceed the
> supported range.
Which is better, reject, or round up to 1?
Andrew
More information about the lvc-project
mailing list