nvethernet: Skip PHC update if no config change

Issue: Restarting of PTP daemon updates
the current system time in MAC registers.

Fix: Configure PTP registers only if PTP daemon
sends updated configuration. If the configuration
is same continue with earlier registers update.
System time will be set in the MAC registers at
the time of ptp_early_init and the 1st ptp
daemon ioctl to set HW configuration.

Bug 4259584

Change-Id: Ied0eec498cfd4283b71797abf3b272d19998064f
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2994409
(cherry picked from commit e774e69777d92a7136ec6c61571e677bfbde6ebf)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010369
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Rakesh Goyal
2023-10-10 08:15:55 +00:00
committed by mobile promotions
parent 99fa3ab6b2
commit 8ca3fa5c51
3 changed files with 11 additions and 0 deletions

View File

@@ -3035,6 +3035,8 @@ static int ether_close(struct net_device *ndev)
/* Reset MAC loopback variable */
pdata->mac_loopback_mode = OSI_DISABLE;
memset(&pdata->ptp_config, 0, sizeof(sizeof(struct hwtstamp_config)));
return 0;
}
@@ -6973,6 +6975,7 @@ static int ether_suspend_noirq(struct device *dev)
if (osi_core->mac == OSI_MAC_HW_MGBE)
pm_runtime_put_sync(pdata->dev);
memset(&pdata->ptp_config, 0, sizeof(sizeof(struct hwtstamp_config)));
return 0;
}