From 7a76c36b34b4b05b20ac98f21a63954e2af4a026 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 16 Apr 2018 07:28:19 -0700 Subject: [PATCH] nsm, pmc: Check for missing HW time stamps. As of 510777deca1d message layer no longer returns -ETIME. Callers of msg_post_recv() are expected to check for missing time stamps themselves. This patch updates the two forgotten call sites. Fixes: 510777deca1d ("msg: Move the check for missing HW time stamps into caller.") Signed-off-by: Richard Cochran --- nsm.c | 9 +++++---- pmc_common.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/nsm.c b/nsm.c index 0fb73fb..cefea5d 100644 --- a/nsm.c +++ b/nsm.c @@ -337,16 +337,17 @@ static struct ptp_message *nsm_recv(struct nsm *nsm, int fd) case -EBADMSG: pr_err("bad message"); break; - case -ETIME: - pr_err("received %s without timestamp", - msg_type_string(msg_type(msg))); - break; case -EPROTO: pr_debug("ignoring message"); break; } goto failed; } + if (msg_sots_missing(msg)) { + pr_err("received %s without timestamp", + msg_type_string(msg_type(msg))); + goto failed; + } return msg; failed: diff --git a/pmc_common.c b/pmc_common.c index d1eafe7..fcb9c8e 100644 --- a/pmc_common.c +++ b/pmc_common.c @@ -326,16 +326,17 @@ struct ptp_message *pmc_recv(struct pmc *pmc) case -EBADMSG: pr_err("bad message"); break; - case -ETIME: - pr_err("received %s without timestamp", - msg_type_string(msg_type(msg))); - break; case -EPROTO: pr_debug("ignoring message"); break; } goto failed; } + if (msg_sots_missing(msg)) { + pr_err("received %s without timestamp", + msg_type_string(msg_type(msg))); + goto failed; + } return msg; failed: