mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvethernet: read actual ptp clock index
Issue: currently always returning 0 as PTP clock index Fix: Instead of hardcoding the ptp clock index to 0, read actual index using ptp_clock_index. Bug 2703848 Change-Id: Icff23ab516c4e16df02230a7dc7369e133bd7a5f Signed-off-by: Narayan Reddy <narayanr@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2197387 Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
6496931610
commit
e93d5e1e55
@@ -498,23 +498,28 @@ static int ether_set_pauseparam(struct net_device *ndev,
|
||||
*
|
||||
* Algorithm: Function used to query the PTP capabilities for given netdev.
|
||||
*
|
||||
* @param[in] net: Net device data.
|
||||
* @param[in] ndev: Net device data.
|
||||
* @param[in] info: Holds device supported timestamping types
|
||||
*
|
||||
* @note HW need to support PTP functionality.
|
||||
*
|
||||
* @return zero on success
|
||||
*/
|
||||
static int ether_get_ts_info(struct net_device *net,
|
||||
static int ether_get_ts_info(struct net_device *ndev,
|
||||
struct ethtool_ts_info *info)
|
||||
{
|
||||
struct ether_priv_data *pdata = netdev_priv(ndev);
|
||||
|
||||
info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE |
|
||||
SOF_TIMESTAMPING_SOFTWARE;
|
||||
info->phc_index = 0;
|
||||
|
||||
if (pdata->ptp_clock) {
|
||||
info->phc_index = ptp_clock_index(pdata->ptp_clock);
|
||||
}
|
||||
|
||||
info->tx_types = (1 << HWTSTAMP_TX_OFF) | (1 << HWTSTAMP_TX_ON);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user