Re: [PATCH net-next v1] net: microchip: lan743x: Reduce PTP timeout on HW failure

From: Simon Horman
Date: Sat May 04 2024 - 04:52:38 EST


On Thu, May 02, 2024 at 10:33:00AM +0530, Rengarajan S wrote:
> The PTP_CMD_CTL is a self clearing register which controls the PTP clock
> values. In the current implementation driver waits for a duration of 20
> sec in case of HW failure to clear the PTP_CMD_CTL register bit. This
> timeout of 20 sec is very long to recognize a HW failure, as it is
> typically cleared in one clock(<16ns). Hence reducing the timeout to 1 sec
> would be sufficient to conclude if there is any HW failure observed. The
> usleep_range will sleep somewhere between 1 msec to 20 msec for each
> iteration. By setting the PTP_CMD_CTL_TIMEOUT_CNT to 50 the max timeout
> is extended to 1 sec.
>
> Signed-off-by: Rengarajan S <rengarajan.s@xxxxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>