summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
diff options
context:
space:
mode:
authorNaveen Mamindlapalli <naveenm@marvell.com>2021-09-28 23:13:46 +0530
committerDavid S. Miller <davem@davemloft.net>2021-09-29 10:27:33 +0100
commit43510ef4ddad39d815f0f9396521a139d69b0baf (patch)
tree572399fc49608364304d1e1bfbec765805852634 /drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
parentffd2f89ad05cd620d822112a07b0c5669fa9e333 (diff)
octeontx2-nicvf: Add PTP hardware clock support to NIX VF
This patch adds PTP PHC support to NIX VF interfaces. This enables a VF to run PTP master/slave instance. PTP block being a shared hardware resource it is recommended to avoid running multiple PTP instances in the system which will impact the PTP clock accuracy. Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
index 5e3056a89ee0..977a8a40d7d1 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
@@ -223,6 +223,11 @@ int otx2_ptp_init(struct otx2_nic *pfvf)
struct ptp_req *req;
int err;
+ if (is_otx2_lbkvf(pfvf->pdev)) {
+ pfvf->ptp = NULL;
+ return 0;
+ }
+
mutex_lock(&pfvf->mbox.lock);
/* check if PTP block is available */
req = otx2_mbox_alloc_msg_ptp_op(&pfvf->mbox);