Author: ian Date: Sun Aug 23 16:22:21 2015 New Revision: 287036 URL: https://svnweb.freebsd.org/changeset/base/287036
Log: MFC r286423, r286429: RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout. Only process the PPS event types currently enabled in pps_params.mode. Modified: stable/10/sys/kern/kern_tc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_tc.c ============================================================================== --- stable/10/sys/kern/kern_tc.c Sun Aug 23 16:17:00 2015 (r287035) +++ stable/10/sys/kern/kern_tc.c Sun Aug 23 16:22:21 2015 (r287036) @@ -1511,8 +1511,12 @@ pps_fetch(struct pps_fetch_args *fapi, s } else { err = tsleep(pps, PCATCH, "ppsfch", timo); } - if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) { - continue; + if (err == EWOULDBLOCK) { + if (fapi->timeout.tv_sec == -1) { + continue; + } else { + return (ETIMEDOUT); + } } else if (err != 0) { return (err); } @@ -1668,6 +1672,9 @@ pps_event(struct pps_state *pps, int eve #endif KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); + /* Nothing to do if not currently set to capture this event type. */ + if ((event & pps->ppsparam.mode) == 0) + return; /* If the timecounter was wound up underneath us, bail out. */ if (pps->capgen == 0 || pps->capgen != pps->capth->th_generation) return; _______________________________________________ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"