diff options
author | Aya Levin <ayal@nvidia.com> | 2021-02-25 19:55:20 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-03-29 21:21:51 -0700 |
commit | 3adb60b6a3ed9f233daa632d35cec79fe4781372 (patch) | |
tree | 7726eaa14625f5135b14f1669901c3ff441e05f1 /drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | |
parent | a28359e922c681a23c01e4858175d9e98c5ff88a (diff) | |
download | linux-3adb60b6a3ed9f233daa632d35cec79fe4781372.tar.bz2 |
net:mlx5e: Add PTP-TIR and PTP-RQT
Add PTP-TIR and initiate its RQT to allow PTP-RQ to integrate into the
safe-reopen flow on configuration change. Add rx_ptp_support flag on a
profile and turn it on for ETH driver. With this flag set, create a
redirect-RQT for PTP-RQ.
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c index 4595d2388d83..c1c41c8656dc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c @@ -663,3 +663,12 @@ void mlx5e_ptp_deactivate_channel(struct mlx5e_ptp *c) napi_disable(&c->napi); } + +int mlx5e_ptp_get_rqn(struct mlx5e_ptp *c, u32 *rqn) +{ + if (!c || !test_bit(MLX5E_PTP_STATE_RX, c->state)) + return -EINVAL; + + *rqn = c->rq.rqn; + return 0; +} |