From 5f0c0344944d98289e7f54174bc0326661463004 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 11 Mar 2012 10:04:42 +0100 Subject: [PATCH] Throw an error at the port level on missing transmit time stamps. We always wait for the transmit time stamp after sending an event message. Thus a missing time stamp is clearly a fault, even if the hardware can only handle one time stamp at a time. Signed-off-by: Richard Cochran --- port.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/port.c b/port.c index 82c6166..978fca3 100644 --- a/port.c +++ b/port.c @@ -356,6 +356,10 @@ static int port_delay_request(struct port *p) pr_err("port %hu: send delay request failed", portnum(p)); goto out; } + if (msg_sots_missing(msg)) { + pr_err("missing timestamp on transmitted delay request"); + goto out; + } if (p->delay_req) msg_put(p->delay_req); @@ -466,6 +470,11 @@ static int port_tx_sync(struct port *p) err = -1; goto out; } + if (msg_sots_missing(msg)) { + pr_err("missing timestamp on transmitted sync"); + err = -1; + goto out; + } /* * Send the follow up message right away.