#ifdef PPS_SYNC
case PPS_IOC_KCBIND:
#endif
mutex_spin_enter(&timecounter_lock);
error = pps_ioctl(cmd, data, &zst->zst_pps_state);
if (zst->zst_pps_state.ppsparam.mode & PPS_CAPTUREBOTH)
zst->zst_ppsmask = ZSRR0_DCD;
else
zst->zst_ppsmask = 0;
mutex_spin_exit(&timecounter_lock);
break;
case TIOCDCDTIMESTAMP: /* XXX old, overloaded API used by xntpd v3 */
if (cs->cs_rr0_pps == 0) {
error = EINVAL;
break;
}
mutex_spin_enter(&timecounter_lock);
#ifndef PPS_TRAILING_EDGE
TIMESPEC_TO_TIMEVAL((struct timeval *)data,
&zst->zst_pps_state.ppsinfo.assert_timestamp);
#else
TIMESPEC_TO_TIMEVAL((struct timeval *)data,
&zst->zst_pps_state.ppsinfo.clear_timestamp);
#endif
mutex_spin_exit(&timecounter_lock);
/*
* Now update interrupts.
*/
zs_maskintr(zst);
/*
* If nothing is being transmitted, set up new current values,
* else mark them as pending.
*/
if (!cs->cs_heldchange) {
if (zst->zst_tx_busy) {
zst->zst_heldtbc = zst->zst_tbc;
zst->zst_tbc = 0;
cs->cs_heldchange = 1;
} else
zs_loadchannelregs(cs);
}
break;