| 1429 | } |
| 1430 | |
| 1431 | static void bnxt_ptp_get_current_time(void *arg) |
| 1432 | { |
| 1433 | struct bnxt *bp = arg; |
| 1434 | struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; |
| 1435 | int rc; |
| 1436 | |
| 1437 | rc = is_bnxt_in_error(bp); |
| 1438 | if (rc) |
| 1439 | return; |
| 1440 | |
| 1441 | if (!ptp) |
| 1442 | return; |
| 1443 | |
| 1444 | rte_spinlock_lock(&ptp->ptp_lock); |
| 1445 | ptp->old_time = ptp->current_time; |
| 1446 | bnxt_hwrm_port_ts_query(bp, BNXT_PTP_FLAGS_CURRENT_TIME, |
| 1447 | &ptp->current_time); |
| 1448 | rte_spinlock_unlock(&ptp->ptp_lock); |
| 1449 | rc = rte_eal_alarm_set(US_PER_S, bnxt_ptp_get_current_time, (void *)bp); |
| 1450 | if (rc != 0) { |
| 1451 | PMD_DRV_LOG(ERR, "Failed to re-schedule PTP alarm\n"); |
| 1452 | bp->flags2 &= ~BNXT_FLAGS2_PTP_ALARM_SCHEDULED; |
| 1453 | } |
| 1454 | } |
| 1455 | |
| 1456 | static int bnxt_schedule_ptp_alarm(struct bnxt *bp) |
| 1457 | { |
nothing calls this directly
no test coverage detected