Lines Matching refs:pfvf

51 	struct otx2_nic *pfvf = ptp->nic;  in otx2_ptp_hw_adjtime()  local
58 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_hw_adjtime()
61 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_hw_adjtime()
67 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_hw_adjtime()
117 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_hw_settime() local
127 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_hw_settime()
130 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_hw_settime()
137 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_hw_settime()
233 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_tc_adjtime() local
235 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_tc_adjtime()
237 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_tc_adjtime()
325 struct otx2_nic *pfvf = ptp->nic; in otx2_sync_tstamp() local
328 mutex_lock(&pfvf->mbox.lock); in otx2_sync_tstamp()
330 mutex_unlock(&pfvf->mbox.lock); in otx2_sync_tstamp()
368 int otx2_ptp_init(struct otx2_nic *pfvf) in otx2_ptp_init() argument
375 if (is_otx2_lbkvf(pfvf->pdev)) { in otx2_ptp_init()
376 pfvf->ptp = NULL; in otx2_ptp_init()
380 mutex_lock(&pfvf->mbox.lock); in otx2_ptp_init()
382 req = otx2_mbox_alloc_msg_ptp_op(&pfvf->mbox); in otx2_ptp_init()
384 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
390 err = otx2_sync_mbox_msg(&pfvf->mbox); in otx2_ptp_init()
392 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
395 mutex_unlock(&pfvf->mbox.lock); in otx2_ptp_init()
403 ptp_ptr->nic = pfvf; in otx2_ptp_init()
447 ptp_ptr->ptp_clock = ptp_clock_register(&ptp_ptr->ptp_info, pfvf->dev); in otx2_ptp_init()
455 if (is_dev_otx2(pfvf->pdev)) { in otx2_ptp_init()
465 pfvf->ptp = ptp_ptr; in otx2_ptp_init()
472 void otx2_ptp_destroy(struct otx2_nic *pfvf) in otx2_ptp_destroy() argument
474 struct otx2_ptp *ptp = pfvf->ptp; in otx2_ptp_destroy()
479 cancel_delayed_work(&pfvf->ptp->synctstamp_work); in otx2_ptp_destroy()
483 pfvf->ptp = NULL; in otx2_ptp_destroy()
487 int otx2_ptp_clock_index(struct otx2_nic *pfvf) in otx2_ptp_clock_index() argument
489 if (!pfvf->ptp) in otx2_ptp_clock_index()
492 return ptp_clock_index(pfvf->ptp->ptp_clock); in otx2_ptp_clock_index()
496 int otx2_ptp_tstamp2time(struct otx2_nic *pfvf, u64 tstamp, u64 *tsns) in otx2_ptp_tstamp2time() argument
498 if (!pfvf->ptp) in otx2_ptp_tstamp2time()
501 *tsns = pfvf->ptp->ptp_tstamp2nsec(&pfvf->ptp->time_counter, tstamp); in otx2_ptp_tstamp2time()