net: micrel: Fix set/get PHC time for lan8814
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Fri, 26 Jan 2024 07:30:42 +0000 (08:30 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Jan 2024 11:08:16 +0000 (12:08 +0100)
commit8e41d6644f9aff1f898997418e4f2fee6bb959e5
tree96c2cbe4e9059f0212ec30597352020b67bbb7de
parent3f3ebe53620818f6e9b029850cb47b96a4ac5b3b
net: micrel: Fix set/get PHC time for lan8814

When setting or getting PHC time, the higher bits of the second time (>32
bits) they were ignored. Meaning that setting some time in the future like
year 2150, it was failing to set this.

The issue can be reproduced like this:

 # phc_ctl /dev/ptp1 set 10000000000
 phc_ctl[12.290]: set clock time to 10000000000.000000000 or Sat Nov 20 17:46:40 2286

 # phc_ctl /dev/ptp1 get
 phc_ctl[15.309]: clock time is 1410065411.018055420 or Sun Sep  7 04:50:11 2014

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Divya Koppera <divya.koppera@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240126073042.1845153-1-horatiu.vultur@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/micrel.c