From 0054f0f74b4415097c17e647b18be568e088debd Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 26 Apr 2002 20:24:28 +0000 Subject: Simplify the RFC2783 and PPS_SYNC timestamp collection API. --- sys/pci/xrpu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index 1cae322..6a2f13c 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -94,22 +94,28 @@ xrpu_poll_pps(struct timecounter *tc) for (i = 0; i < XRPU_MAX_PPS; i++) { if (sc->assert[i]) { + sc->pps[i].capgen = tc->tc_generation; ppscount = *(sc->assert[i]) & tc->tc_counter_mask; j = 0; do { count1 = ppscount; ppscount = *(sc->assert[i]) & tc->tc_counter_mask; } while (ppscount != count1 && ++j < 5); - pps_event(&sc->pps[i], tc, ppscount, PPS_CAPTUREASSERT); + sc->pps[i].captc = tc; + sc->pps[i].capcount = ppscount; + pps_event(&sc->pps[i], PPS_CAPTUREASSERT); } if (sc->clear[i]) { + sc->pps[i].capgen = tc->tc_generation; j = 0; ppscount = *(sc->clear[i]) & tc->tc_counter_mask; do { count1 = ppscount; ppscount = *(sc->clear[i]) & tc->tc_counter_mask; } while (ppscount != count1 && ++j < 5); - pps_event(&sc->pps[i], tc, ppscount, PPS_CAPTURECLEAR); + sc->pps[i].captc = tc; + sc->pps[i].capcount = ppscount; + pps_event(&sc->pps[i], PPS_CAPTURECLEAR); } } } -- cgit v1.1